Skip to content
Snippets Groups Projects
Commit 1e5a9388 authored by Robert Bossy's avatar Robert Bossy
Browse files

generate taxid_ files

parent e24f2062
No related branches found
No related tags found
No related merge requests found
configfile: 'config.yaml'
rule all:
input:
config['OUTDIR'] + '/finish.txt',
config['OUTDIR'] + '/taxid_microorganisms.txt'
rule check:
input:
config['OUTDIR'] + '/taxa+id_microorganisms.txt'
......@@ -15,17 +21,17 @@ rule check:
rule microorganisms:
output:
config['OUTDIR'] + '/taxa+id_microorganisms.txt'
config['OUTDIR'] + '/{p}_microorganisms.txt'
input:
full=config['OUTDIR'] + '/taxa+id_full.txt',
full=config['OUTDIR'] + '/{p}_full.txt',
roots='microorganisms-roots'
shell:
'''./cut-root.py {input.roots}/* <{input.full} >{output}'''
rule full:
rule taxaid_full:
output:
config['OUTDIR'] + '/taxa+id_full.txt'
......@@ -34,3 +40,14 @@ rule full:
shell:
'''{config[REWRITE_TAXONOMY]} -namesFile {config[OUTDIR]}/{config[NCBI_DIR]}/names.dmp -namesFile {input}/dsmz-names.dmp -prefix ncbi: -rejectionFile reject.txt -saturationFile saturate.txt -pattern '{{NAME}}\t{{TAXID}}\t{{CANONICAL}}\t{{TAXID_PATH}}\t{{POS_TAG}}\t{{RANK}}\t{{SPECIES_TAXID}}\t{{SPECIES_NAME}}\n' {config[OUTDIR]}/{config[NCBI_DIR]}/nodes.dmp {input}/dsmz-nodes.dmp >{output}'''
rule taxid_full:
output:
config['OUTDIR'] + '/taxid_full.txt'
input:
config['OUTDIR'] + '/' + config['DSMZ_MATCH_DIR']
shell:
'''{config[REWRITE_TAXONOMY]} -taxaDict -namesFile {config[OUTDIR]}/{config[NCBI_DIR]}/names.dmp -namesFile {input}/dsmz-names.dmp -prefix ncbi: -rejectionFile reject.txt -saturationFile saturate.txt -pattern '{{TAXID}}\t{{CANONICAL}}\t{{TAXID_PATH}}\t{{RANK}}\n' {config[OUTDIR]}/{config[NCBI_DIR]}/nodes.dmp {input}/dsmz-nodes.dmp >{output}'''
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment