Commit 168e4c87 authored by peguerin's avatar peguerin
Browse files

individual rules for step 03

parent c7040b60
### Assign each sequence record to the corresponding sample/marker combination
rule assign_sequences:
output:
assign='../results/03_demultiplex/01_assign_sequences/{demultiplex}.ali.assigned.fastq',
unid='../results/03_demultiplex/01_assign_sequences/{demultiplex}.unidentified.fastq'
singularity:
config["singularity"]["obitools"]
params:
dmulti= lambda wildcards: dfRunMarker[dfRunMarker.projMarkRun == wildcards.demultiplex].to_dict('records')[0],
log:
'../logs/03_demultiplex/01_assign_sequences/{demultiplex}.log'
shell:
'''ngsfilter -t {params.dmulti[dat]} -u {output.unid} ../02_assembly/02_remove_unaligned/{params.dmulti[run]}.ali.fastq --fasta-output > {output.assign} 2> {log}'''
### Split the input sequence file in a set of subfiles according to the values of attribute `sample`
rule split_sequences:
input:
'../results/03_demultiplex/01_assign_sequences/{demultiplex}.ali.assigned.fastq'
params:
dir='../results/03_demultiplex/02_raw/{demultiplex}/'
singularity:
config["singularity"]["obitools"]
log:
'../logs/03_demultiplex/02_split_sequences/{demultiplex}.log'
shell:
'''mkdir -p {params.dir}; obisplit -p "{params.dir}" -t sample --fasta {input} 2> {log}'''
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment