Commit bdc1d78c authored by Amine  GHOZLANE's avatar Amine GHOZLANE

Reactivate checking for extract_fasta

parent 5db48a4a
......@@ -66,11 +66,17 @@ params.out = "$baseDir/"
myDir = file(params.out)
myDir.mkdirs()
fastqChannel = Channel.fromPath("${params.in}")
/*fastqChannel = Channel.fromPath("${params.in}")
.ifEmpty { exit 1, "Cannot find read file: ${params.in}" }
.splitCsv(sep: "\t")
.groupTuple()
.map{it -> [it[0], it[1][0]] }
.map{it -> [it[0], it[1][0]] }*/
fastqChannel = Channel
.fromPath("${params.in}/*.{fastq,fastq.gz}")
.map{
file -> tuple(file.baseName,file)
}
.ifEmpty { exit 1, "Cannot find any reads matching: ${params.in}" }
process fastqfiltering {
......@@ -78,7 +84,8 @@ process fastqfiltering {
cpus params.cpus
input:
set sample_id, reads from fastqChannel
//set sample_id, reads from fastqChannel
set sample_id, file(reads) from fastqChannel
output:
set sample_id, file("*_notmapped.fastq") into filteringChannel
......@@ -273,13 +280,13 @@ process taxonomy {
ExtractNCBIDB2.py -f !{nt} -g !{sample_id}_taxonomy.txt -nb 1 \
-o !{sample_id}_annotation.txt
# Get sequence not annotated
#if [ -f "!{sample_id}_annotation.txt" ]
#then
extract_fasta.py -q !{sample_id}_annotation.txt \
-t !{fasta} -n -o !{sample_id}_not_annotated.fasta
#else
# touch !{sample_id}_annotation.txt !{sample_id}_not_annotated.fasta
#fi
if [ -f "!{sample_id}_annotation.txt" ]
then
extract_fasta.py -q !{sample_id}_annotation.txt \
-t !{fasta} -n -o !{sample_id}_not_annotated.fasta
else
touch !{sample_id}_annotation.txt !{sample_id}_not_annotated.fasta
fi
else
cat !{fasta} > !{sample_id}_not_annotated.fasta
......
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