Mercurial > repos > yating-l > jbrowsearchivecreator
diff util/Reader.py @ 39:4a69515eed63 draft
planemo upload for repository https://github.com/Yating-L/jbrowse-archive-creator.git commit 91271a6c0d39c923f0d460b2979247baa297286b-dirty
| author | yating-l |
|---|---|
| date | Fri, 13 Apr 2018 18:21:35 -0400 |
| parents | 07cc5384dd61 |
| children | b1553f2a4942 |
line wrap: on
line diff
--- a/util/Reader.py Fri Apr 06 13:44:56 2018 -0400 +++ b/util/Reader.py Fri Apr 13 18:21:35 2018 -0400 @@ -1,4 +1,6 @@ +import os import json +import shutil import logging import codecs @@ -67,8 +69,11 @@ exit(1) def getTrackType(self): - track_type = self.args.get("track_type") - return track_type + try: + return self.args.get("feature_tracks_type") + except KeyError: + print ("feature tracks type is not defined in the input file!") + exit(1) def getGenomeName(self): genome_name = santitizer.sanitize_name_input(self.args["genome_name"]) @@ -76,12 +81,13 @@ def getRefGenome(self): array_inputs_reference_genome = self.args["fasta"] - # TODO: Replace these with the object Fasta input_fasta_file = array_inputs_reference_genome["false_path"] input_fasta_file_name = santitizer.sanitize_name_input(array_inputs_reference_genome["name"]) - #genome_name = santitizer.sanitize_name_input(self.args["genome_name"]) + # Add "fasta" extension because Apollo needs it to create annotation + refseq_file = os.path.join(os.path.dirname(input_fasta_file), input_fasta_file_name + ".fasta") + shutil.copyfile(input_fasta_file, refseq_file) genome_name = self.getGenomeName() - reference_genome = Fasta(input_fasta_file, + reference_genome = Fasta(refseq_file, input_fasta_file_name, genome_name) return reference_genome
