Skip to content

Commit

Permalink
re.IGNORECASE
Browse files Browse the repository at this point in the history
  • Loading branch information
rbarreror authored Oct 5, 2022
1 parent b95f5a1 commit 6711d7e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ProteinAssigner_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,15 @@ def main(paramsDict):
epilog=f'''\
Created 2021-11-24, Rafael Barrero Rodriguez
Usage:
{script_name} -c "path to YAML config file"
{script_name} -i "Path\To\Input.File" -o "Path\To\Output.File" -s "Sequence" -q "Protein_Accessions" "Protein_Descriptions" -qm "Protein_Accessions_MPP" "Protein_Descriptions_MPP" -w 2
{script_name} -i "Path\To\Input.File" -o "Path\To\Output.File" -s "Sequence" -f "Path\To\Fasta.fa" -cd "Protein_Description_Candidate" -ca "Protein_Accession_Candidate" -ma "Protein_Accessions_MPP" -md "Protein_Descriptions_MPP" -w 2
FROM CONFIG:
{script_name} -c "path to YAML config file"
FROM COMMAND LINE (iSanXoT):
Column mode:
{script_name} -i "Path\To\Input.File" -o "Path\To\Output.File" -s "Sequence" -q "Protein_Accession_Candidate" -qm "Protein_Accessions_MPP" -w 4
Fasta mode:
{script_name} -i "Path\To\Input.File" -o "Path\To\Output.File" -s "Sequence" -f "Path\To\Fasta.fa" -cd "Protein_Description_Candidate" -ca "Protein_Accession_Candidate" -qm "Protein_Accessions_MPP" -md "Protein_Descriptions_MPP" -w 4
''')


Expand Down Expand Up @@ -636,7 +642,7 @@ def main(paramsDict):
"n_cores": args.n_workers,
}

paramsDict['regex'] = [re.compile(i) for i in re.split(r'(?<!\\)/', paramsDict['regex'].strip('/ '))]
paramsDict['regex'] = [re.compile(i, re.IGNORECASE) for i in re.split(r'(?<!\\)/', paramsDict['regex'].strip('/ '))]


# logging debug level. By default, info level
Expand All @@ -655,4 +661,4 @@ def main(paramsDict):
t0 = time()
main(paramsDict)
m, s = divmod(time()-t0,60)
logging.info(f'End script: {int(m)}m and {round(s,2)}s')
logging.info(f'End script: {int(m)}m and {round(s,2)}s')

0 comments on commit 6711d7e

Please sign in to comment.