Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
edna
snakemake_rapidrun_obitools
Commits
aaa5c701
Commit
aaa5c701
authored
Apr 27, 2021
by
peguerin
Browse files
fix custombdr config
parent
fd71f81a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Snakefile
View file @
aaa5c701
...
...
@@ -274,13 +274,13 @@ else:
dfpmr['fasta'] = dfpmr['marker'].map(config["assign_taxon"]["fasta"])
## also perform taxonomic assignment with custom reference database
if config['custom_b
dr']['status
']:
if config['custom_b
aseref
']:
print("also perform taxonomic assignment with custom reference database")
for crmarker in config['custom
_bdr
']['bdr'].keys():
for crmarker in config['
assign_
custom
tax
']['bdr'].keys():
print(crmarker)
df_crmarker = dfpmr[(dfpmr.marker == crmarker)].copy()
df_crmarker['bdr'] = config['custom
_bdr
']['bdr'][crmarker]
df_crmarker['fasta'] = config['custom
_bdr
']['fasta'][crmarker]
df_crmarker['bdr'] = config['
assign_
custom
tax
']['bdr'][crmarker]
df_crmarker['fasta'] = config['
assign_
custom
tax
']['fasta'][crmarker]
df_crmarker['projmarkrun'] = df_crmarker['projmarkrun'].astype(str) + '_custom'
dfpmr = pandas.concat([dfpmr, df_crmarker], ignore_index=True)
customprojmarkrun = dfpmr[dfpmr['projmarkrun'].str.contains('_custom')]['projmarkrun']
...
...
@@ -371,7 +371,7 @@ rule flag_filtering_done:
touch('results/00_flags/filtering.flag')
if config['custom_b
dr']['status
']:
if config['custom_b
aseref
']:
rule custom_bdr_cat_samples_into_runs:
input:
'results/00_flags/filtering.flag'
...
...
@@ -396,7 +396,7 @@ else:
'''
include: "rules/dereplicate_runs.smk"
if config['custom_b
dr']['status
']:
if config['custom_b
aseref
']:
include: "rules/custom_taxonomic_assignment.smk"
else:
include: "rules/taxonomic_assignment.smk"
...
...
@@ -418,7 +418,10 @@ rule flag_table_assigned_sequences:
thisMarker = pmr.split('/')[1]
thisRun = pmr.split('/')[2]
tableNameFile = "results/18_table_assigned_sequences/"+pmr+".csv"
newTableNameFile = "results/"+thisProjet+"_"+thisMarker+"_"+thisRun+"_ecotag_ncbi.csv"
if "custom" in thisRun:
newTableNameFile = "results/"+thisProjet+"_"+thisMarker+"_"+thisRun+"_ecotag.csv"
else:
newTableNameFile = "results/"+thisProjet+"_"+thisMarker+"_"+thisRun+"_ncbi_ecotag.csv"
print(thisProjet+"_"+thisMarker+"_"+thisRun+", ", end='')
os.system("cp {0} {1}".format(tableNameFile, newTableNameFile))
print("done")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment