Verified Commit d448ef6a authored by Laurent Modolo's avatar Laurent Modolo
Browse files

kb: working marseq quantif pipeline

parent 4eef1122
...@@ -9,13 +9,9 @@ workflow index_fasta { ...@@ -9,13 +9,9 @@ workflow index_fasta {
fasta fasta
cdna cdna
gtf gtf
transcript_to_gene
main: main:
transcript_to_gene tr2g(gtf)
.ifEmpty(["NO T2G", ""])
.set{ transcript_to_gene_optional }
tr2g(gtf, transcript_to_gene_optional)
index_default(fasta, cdna, gtf, tr2g.out.t2g) index_default(fasta, cdna, gtf, tr2g.out.t2g)
emit: emit:
...@@ -35,23 +31,13 @@ process tr2g { ...@@ -35,23 +31,13 @@ process tr2g {
input: input:
tuple val(file_id), path(gtf) tuple val(file_id), path(gtf)
tuple val(t2g_id), file(transcript_to_gene)
output: output:
tuple val(file_id), path("t2g.txt"), emit: t2g tuple val(file_id), path("t2g.txt"), emit: t2g
script: script:
if (t2g_id == "NO T2G")
"""
t2g.py --gtf ${gtf} && \
mv t2g.txt t2g_to_fix.txt && \
sed -E 's/\\.[0-9]+//g' t2g_to_fix.txt | \
awk '{print(\$1 "\\t" \$2)}' > t2g.txt
"""
else
""" """
mv ${transcript_to_gene} t2g.txt t2g.py --gtf ${gtf}
""" """
} }
...@@ -210,7 +196,7 @@ process kb_marseq { ...@@ -210,7 +196,7 @@ process kb_marseq {
-o ${file_prefix} \ -o ${file_prefix} \
${whitelist_param} \ ${whitelist_param} \
${params.count} \ ${params.count} \
-x 1,0,6:1,6,14:1,14,0 \ -x 1,0,6:1,6,14:0,0,0 \
${reads[0]} ${reads[1]} > ${file_prefix}_kb_mapping_report.txt ${reads[0]} ${reads[1]} > ${file_prefix}_kb_mapping_report.txt
""" """
else else
...@@ -223,7 +209,7 @@ process kb_marseq { ...@@ -223,7 +209,7 @@ process kb_marseq {
-o ${file_prefix} \ -o ${file_prefix} \
${whitelist_param} \ ${whitelist_param} \
${params.count} \ ${params.count} \
-x 1,0,6:1,6,14:1,14,0 \ -x 1,0,6:1,6,14:0,0,0 \
${reads} > ${file_prefix}_kb_mapping_report.txt ${reads} > ${file_prefix}_kb_mapping_report.txt
""" """
} }
\ No newline at end of file
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