Skip to content

Commit

Permalink
Fix on namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
iquasere committed Sep 6, 2021
1 parent 47a93a4 commit 77e1f27
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions upimapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_arguments(self):
"'output' parameter just for that specific file")
parser.add_argument("-cols", "--columns", default='',
help="List of UniProt columns to obtain information from (separated by &)")
parser.add_argument("-dbs", "--annotation-databases", default='',
parser.add_argument("-dbs", "--databases", default='',
help="List of databases to cross-check with UniProt information (separated by &)")
parser.add_argument("--blast", action="store_true", default=False,
help="If input file is in BLAST TSV format (will consider one ID per line if not set)")
Expand Down Expand Up @@ -218,8 +218,7 @@ def uniprot_fasta_workflow(self, all_ids, output, max_iter=5, step=1000, sleep_t
ids_missing = list(set(all_ids) - set(ids_done))

tries = 0
ids_done = ([ide.split('|')[1] for ide in self.get_fasta_ids(output)]
if os.path.isfile(output) else list())
ids_done = ([ide.split('|')[1] for ide in self.get_fasta_ids(output)] if os.path.isfile(output) else list())
while len(ids_done) < len(all_ids) and tries < max_iter:
print('Checking which IDs are missing information.')
ids_missing = list(set([ide for ide in tqdm(all_ids, desc='Checking which IDs are missing information.')
Expand Down Expand Up @@ -381,7 +380,7 @@ def upimapi(self):
columns = args.columns.split('&') if args.columns != '' else list()
databases = args.databases.split('&') if args.databases != '' else list()

if hasattr(args, "output_table"):
if args.output_table:
table_output = args.output_table
pathlib.Path('/'.join(args.output_table.split('/')[:-1])).mkdir(parents=True, exist_ok=True)
else:
Expand Down

0 comments on commit 77e1f27

Please sign in to comment.