+
+ final private void checkColumn( final int col ) {
+ if ( ( col >= _length ) || ( col < 0 ) ) {
+ throw new IllegalArgumentException( "column " + col + " is out of range" );
+ }
+ }
+
+ final private void checkRow( final int row ) {
+ if ( ( row >= _seqs ) || ( row < 0 ) ) {
+ throw new IllegalArgumentException( "row " + row + " is out of range" );
+ }
+ }
+
+ final private void deleteColumn( final int col ) {
+ checkColumn( col );
+ for( int c = col; c < _length - 1; ++c ) {
+ _mapped_col_positions[ c ] = _mapped_col_positions[ c + 1 ];
+ }
+ --_length;
+ }
+
+ final private void deleteRow( final int row ) {
+ checkRow( row );
+ for( int r = row; r < _seqs - 1; ++r ) {
+ _mapped_row_positions[ r ] = _mapped_row_positions[ r + 1 ];
+ }
+ --_seqs;
+ }
+
+ public final static DeleteableMsa createInstance( final List<Sequence> seqs ) {
+ return new DeleteableMsa( ( BasicMsa ) BasicMsa.createInstance( seqs ) );
+ }
+
+ public final static DeleteableMsa createInstance( final Msa msa ) {
+ return new DeleteableMsa( ( BasicMsa ) msa );
+ }