File tree Expand file tree Collapse file tree 2 files changed +0
-38
lines changed
qiita_db/metadata_template Expand file tree Collapse file tree 2 files changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -481,32 +481,6 @@ def update(self, md_template):
481
481
if '_qiime_' not in basename (fp ):
482
482
pt .create_qiime_mapping_file (fp )
483
483
484
- def remove_category (self , category ):
485
- """Remove a category from the sample template
486
-
487
- Parameters
488
- ----------
489
- category : str
490
- The category to remove
491
-
492
- Raises
493
- ------
494
- QiitaDBColumnError
495
- If the column does not exist in the table
496
- """
497
- table_name = self ._table_name (self .study_id )
498
- conn_handler = SQLConnectionHandler ()
499
-
500
- if category not in self .categories ():
501
- raise QiitaDBColumnError ("Column %s does not exist in %s" %
502
- (category , table_name ))
503
-
504
- # This operation may invalidate another user's perspective on the
505
- # table
506
- conn_handler .execute ("""
507
- ALTER TABLE qiita.{0} DROP COLUMN {1}""" .format (table_name ,
508
- category ))
509
-
510
484
def update_category (self , category , samples_and_values ):
511
485
"""Update an existing column
512
486
Original file line number Diff line number Diff line change @@ -1237,18 +1237,6 @@ def test_add_category(self):
1237
1237
obs = {k : v ['new_column' ] for k , v in self .tester .items ()}
1238
1238
self .assertEqual (obs , exp )
1239
1239
1240
- def test_remove_category (self ):
1241
- with self .assertRaises (QiitaDBColumnError ):
1242
- self .tester .remove_category ('does not exist' )
1243
-
1244
- for v in self .tester .values ():
1245
- self .assertIn ('elevation' , v )
1246
-
1247
- self .tester .remove_category ('elevation' )
1248
-
1249
- for v in self .tester .values ():
1250
- self .assertNotIn ('elevation' , v )
1251
-
1252
1240
def test_to_file (self ):
1253
1241
"""to file writes a tab delimited file with all the metadata"""
1254
1242
fd , fp = mkstemp ()
You can’t perform that action at this time.
0 commit comments