diff options
author | Peter Amstutz | 2020-04-21 12:53:19 -0400 |
---|---|---|
committer | Peter Amstutz | 2020-04-21 12:53:19 -0400 |
commit | 88d81f853cf04b7f28681dd9cdee775b0422f252 (patch) | |
tree | b23f5dedc100c8508784d20edaba864f91e7444d /bh20sequploader | |
parent | 85b85b676d7ecc218d9f84357b2e7ea0133eed94 (diff) | |
download | bh20-seq-resource-88d81f853cf04b7f28681dd9cdee775b0422f252.tar.gz bh20-seq-resource-88d81f853cf04b7f28681dd9cdee775b0422f252.tar.lz bh20-seq-resource-88d81f853cf04b7f28681dd9cdee775b0422f252.zip |
Working on NCBI import
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Diffstat (limited to 'bh20sequploader')
-rw-r--r-- | bh20sequploader/bh20seq-schema.yml | 4 | ||||
-rw-r--r-- | bh20sequploader/main.py | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/bh20sequploader/bh20seq-schema.yml b/bh20sequploader/bh20seq-schema.yml index 75308ab..ebca35b 100644 --- a/bh20sequploader/bh20seq-schema.yml +++ b/bh20sequploader/bh20seq-schema.yml @@ -162,12 +162,12 @@ $graph: _id: http://www.ebi.ac.uk/efo/EFO_0002699 sequencing_coverage: doc: Sequence coverage defined as the average number of reads representing a given nucleotide (e.g. 100x) - type: float? + type: ["null", float, int] jsonldPredicate: _id: http://purl.obolibrary.org/obo/FLU_0000848 sequencing_coverage2: doc: If a second sequence technology was used you can submit its coverage here - type: float? + type: ["null", float, int] jsonldPredicate: _id: http://purl.obolibrary.org/obo/FLU_0000848 additional_technology_information: diff --git a/bh20sequploader/main.py b/bh20sequploader/main.py index 49d012d..2fda347 100644 --- a/bh20sequploader/main.py +++ b/bh20sequploader/main.py @@ -44,7 +44,8 @@ def main(): with col.open(target, "w") as f: r = args.sequence.read(65536) - print(r[0:20]) + seqlabel = r[1:r.index("\n")] + print(seqlabel) while r: f.write(r) r = args.sequence.read(65536) @@ -67,8 +68,8 @@ def main(): "upload_user": "%s@%s" % (getpass.getuser(), socket.gethostname()) } - col.save_new(owner_uuid=UPLOAD_PROJECT, name="Uploaded by %s from %s" % - (properties['upload_user'], properties['upload_ip']), + col.save_new(owner_uuid=UPLOAD_PROJECT, name="%s uploaded by %s from %s" % + (seqlabel, properties['upload_user'], properties['upload_ip']), properties=properties, ensure_unique_name=True) print("Done") |