Skip to content

Commit 6c572fc

Browse files
committed
should be good
1 parent 26a2122 commit 6c572fc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

qiita_db/commands.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def load_preprocessed_data_from_cmd(study_id, filedir, filepathtype,
9494
The study id to which the preprocessed data belongs
9595
filedir : str
9696
Directory path of the preprocessed data
97-
filepathtype: int
98-
The filepath_type_id of the preprecessed data
97+
filepathtype: str
98+
The filepath_type of the preprecessed data
9999
params_table_name : str
100100
The name of the table which contains the parameters of the
101101
preprocessing
@@ -104,7 +104,9 @@ def load_preprocessed_data_from_cmd(study_id, filedir, filepathtype,
104104
submitted_to_insdc : bool
105105
Has the data been submitted to insdc
106106
"""
107-
filepaths = [(join(filedir, fp), filepathtype) for fp in listdir(filedir)]
107+
fp_types_dict = get_filepath_types()
108+
fp_type = fp_types_dict[filepathtype]
109+
filepaths = [(join(filedir, fp), fp_type) for fp in listdir(filedir)]
108110
return PreprocessedData.create(Study(study_id), params_table, params_id,
109111
filepaths,
110112
submitted_to_insdc=submitted_to_insdc)

qiita_db/test/test_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_import_preprocessed_data(self):
8282
initial_ppd_count = get_count('qiita.preprocessed_data')
8383
initial_fp_count = get_count('qiita.filepath')
8484
ppd = load_preprocessed_data_from_cmd(
85-
1, self.tmpdir, 1, 'preprocessed_sequence_illumina_params',
85+
1, self.tmpdir, 'tar', 'preprocessed_sequence_illumina_params',
8686
1, False)
8787
self.files_to_remove.append(
8888
join(self.db_test_ppd_dir,

0 commit comments

Comments
 (0)