Skip to content
Snippets Groups Projects
Commit 29498d03 authored by Xavier Grand's avatar Xavier Grand
Browse files

add 390bp filtration of reads.

parent 9e7e093c
No related branches found
No related tags found
No related merge requests found
......@@ -40,10 +40,11 @@ process seqkit_grep {
val(gsp)
output:
tuple val(barcode), path("${barcode}/${barcode}_filtered_5RACE_GSP.fastq"), emit: filtered_fastq
tuple val(barcode), path("${barcode}/${barcode}_390bp_filtered_5RACE_GSP.fastq"), emit: filtered_fastq
path("${barcode}/*.csv")
path("${barcode}/*.txt")
path("${barcode}/${barcode}_filtered_5RACE.fastq")
path("${barcode}/${barcode}_filtered_5RACE_GSP.fastq")
script:
lgadapt = Math.round(adapt.size().div(10))
......@@ -57,9 +58,11 @@ process seqkit_grep {
echo ${gsp} > gsp.txt
seqkit grep -i -f adapt.txt -m ${lgadapt} ../${fastq} -o ${barcode}_filtered_5RACE.fastq -j ${task.cpus}
seqkit grep -i -f gsp.txt -m ${lggsp} ${barcode}_filtered_5RACE.fastq -o ${barcode}_filtered_5RACE_GSP.fastq -j ${task.cpus}
seqkit seq --min-len 390 --remove-gaps ${barcode}_filtered_5RACE_GSP.fastq -j ${task.cpus} > ${barcode}_390bp_filtered_5RACE_GSP.fastq
seqkit stats ../${fastq} -T -j ${task.cpus} > ${barcode}_seq_stats.csv
seqkit stats ${barcode}_filtered_5RACE.fastq -T -j ${task.cpus} | tail -n1 >> ${barcode}_seq_stats.csv
seqkit stats ${barcode}_filtered_5RACE_GSP.fastq -T -j ${task.cpus} | tail -n1 >> ${barcode}_seq_stats.csv
seqkit stats ${barcode}_390bp_filtered_5RACE_GSP.fastq -T -j ${task.cpus} | tail -n1 >> ${barcode}_seq_stats.csv
"""
}
......
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