aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreaGuarracino2020-09-04 12:34:54 +0200
committerAndreaGuarracino2020-09-04 12:34:54 +0200
commitc754aab95f47317228a07ccbe3818780aa22a52a (patch)
treec6c067f20d41eb8259e04c8709569d05f7ff6f5b
parent8417375cd86c6ba2f29511964544a267ed883ccd (diff)
downloadbh20-seq-resource-c754aab95f47317228a07ccbe3818780aa22a52a.tar.gz
bh20-seq-resource-c754aab95f47317228a07ccbe3818780aa22a52a.tar.lz
bh20-seq-resource-c754aab95f47317228a07ccbe3818780aa22a52a.zip
fixed bugs in in index management and type conversion
-rw-r--r--bh20sequploader/main.py4
-rw-r--r--scripts/create_sra_metadata/create_sra_metadata.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/bh20sequploader/main.py b/bh20sequploader/main.py
index 314a2ea..f8127af 100644
--- a/bh20sequploader/main.py
+++ b/bh20sequploader/main.py
@@ -47,8 +47,8 @@ def qc_stuff(metadata, sequence_p1, sequence_p2, do_qc=True):
raise ValueError("It is possible to upload just one FASTA file at a time")
target.append(qc_fasta(sequence_p2))
- target[0] = ("reads_1."+target[0][0][6:], target[0][1])
- target[1] = ("reads_2."+target[1][0][6:], target[0][1])
+ target[0] = ("reads_1."+target[0][0][6:], target[0][1], target[0][2])
+ target[1] = ("reads_2."+target[1][0][6:], target[1][1], target[1][2])
if do_qc and target[0][2] == 'text/fasta' and sample_id != target[0][1]:
raise ValueError("The sample_id field in the metadata must be the same as the FASTA header")
diff --git a/scripts/create_sra_metadata/create_sra_metadata.py b/scripts/create_sra_metadata/create_sra_metadata.py
index 8866d01..b872896 100644
--- a/scripts/create_sra_metadata/create_sra_metadata.py
+++ b/scripts/create_sra_metadata/create_sra_metadata.py
@@ -198,7 +198,7 @@ for i, EXPERIMENT_PACKAGE in enumerate(EXPERIMENT_PACKAGE_SET):
missing_value_list.append('\t'.join([accession, 'host_sex', VALUE_text]))
elif TAG_text in ['host_age', 'host age']:
if is_integer(VALUE_text):
- info_for_yaml_dict['host']['host_age'] = VALUE_text
+ info_for_yaml_dict['host']['host_age'] = int(VALUE_text)
info_for_yaml_dict['host']['host_age_unit'] = 'http://purl.obolibrary.org/obo/UO_0000036'
elif TAG_text == 'collected_by':
if VALUE_text.lower() not in ['not available', 'missing']: