Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RMI2 pipelines
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
RMI2
RMI2 pipelines
Commits
81f78d77
Commit
81f78d77
authored
Sep 24, 2020
by
elabaron
Browse files
Options
Downloads
Patches
Plain Diff
src/RNAseq.nf : adapt hisat2 mapping
parent
452f8e2e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/RNAseq.nf
+24
-26
24 additions, 26 deletions
src/RNAseq.nf
with
24 additions
and
26 deletions
src/RNAseq.nf
+
24
−
26
View file @
81f78d77
...
@@ -7,11 +7,13 @@ params.output = "results"
...
@@ -7,11 +7,13 @@ params.output = "results"
params
.
do_fastqc
=
true
params
.
do_fastqc
=
true
params
.
script_cov
=
"src/norm_coverage.sh"
params
.
script_cov
=
"src/norm_coverage.sh"
params
.
filter
=
"data/filter/human_rRNA_tRNA/*.bt2"
params
.
filter
=
"data/filter/human_rRNA_tRNA/*.bt2"
params
.
index_genome
=
"data/genome/*.ht2"
log
.
info
"input raw : ${params.fastq_raw}"
log
.
info
"input raw : ${params.fastq_raw}"
log
.
info
"outut directory : ${params.output}"
log
.
info
"outut directory : ${params.output}"
log
.
info
"do fastqc ? : ${params.do_fastqc}"
log
.
info
"do fastqc ? : ${params.do_fastqc}"
log
.
info
"filter index files : ${params.filter}"
log
.
info
"filter index files : ${params.filter}"
log
.
info
"genome index : ${params.index_genome}"
Channel
Channel
.
fromFilePairs
(
params
.
fastq_raw
)
.
fromFilePairs
(
params
.
fastq_raw
)
...
@@ -24,6 +26,11 @@ Channel
...
@@ -24,6 +26,11 @@ Channel
.
ifEmpty
{
error
"Cannot find any index files matching: ${params.filter}"
}
.
ifEmpty
{
error
"Cannot find any index files matching: ${params.filter}"
}
.
set
{
FILTER_INDEX
}
.
set
{
FILTER_INDEX
}
Channel
.
fromPath
(
params
.
index_genome
)
.
ifEmpty
{
error
"Cannot find any index files matching: ${params.index_genome}"
}
.
set
{
GENOME_INDEX
}
/* Fastqc of raw input */
/* Fastqc of raw input */
process
fastqc_raw
{
process
fastqc_raw
{
...
@@ -164,31 +171,20 @@ process fastqc_filter {
...
@@ -164,31 +171,20 @@ process fastqc_filter {
"""
"""
}
}
/* mapping against human genome with hisat2
/* mapping against human genome with hisat2 */
params.index_hg38 = "/media/adminmanu/Stockage/HISAT2_index_hg38_tran/*.ht2"
log.info "index : ${params.index_hg38}"
Channel
.fromPath ( params.index_hg38 )
.ifEmpty { error "Cannot find any index files matching: ${params.index_hg38}" }
.set { index_file_hg38 }
process
hisat2_human
{
process
hisat2_human
{
tag
"$file_id"
tag
"$file_id"
publishDir
"${params.output}/03_hisat2/"
,
mode:
'copy'
publishDir
"${params.output}/03_hisat2/"
,
mode:
'copy'
errorStrategy 'finish'
input:
input:
set file_id, file(fastq_filtred) from
rRNA_removed_files
set
file_id
,
file
(
fastq_filtred
)
from
FILTER_FASTQ_HISAT
file index from
index_file_hg38
.toList()
file
index
from
GENOME_INDEX
.
toList
()
output:
output:
file "*.fastq.gz" into
reads_non_aligned_hg38
file
"*.fastq.gz"
into
HISAT_UNALIGNED
set file_id, "*_sorted.{bam,bam.bai}" into
sorted_bam_files
set
file_id
,
"*_sorted.{bam,bam.bai}"
into
HISAT_ALIGNED
file "*.txt" into
hisat_report
file
"*.txt"
into
HISAT_LOG
script:
script:
index_id
=
index
[
0
]
index_id
=
index
[
0
]
...
@@ -198,22 +194,24 @@ process hisat2_human {
...
@@ -198,22 +194,24 @@ process hisat2_human {
}
}
}
}
"""
"""
hisat2 -x ${index_id} -p ${task.cpus} \
hisat2 -x ${index_id} \
-1 ${fastq_filtred[0]} -2 ${fastq_filtred[1]} \
-p ${task.cpus} \
-1 ${fastq_filtred[0]} \
-2 ${fastq_filtred[1]} \
--un-conc-gz ${file_id}_notaligned_R%.fastq.gz \
--un-conc-gz ${file_id}_notaligned_R%.fastq.gz \
--rna-strandness 'F' 2> ${file_id}_hisat2_hg38.txt | samtools view -bS -F 4 -o ${file_id}.bam
--rna-strandness 'F' \
2> ${file_id}_hisat2_hg38.txt \
| samtools view -bS -F 4 - \
| samtools sort -@ ${task.cpus} -o ${file_id}.bam \
&& samtools index ${file_id}.bam
if grep -q "ERR" ${file_id}_hisat2_hg38.txt; then
if grep -q "ERR" ${file_id}_hisat2_hg38.txt; then
exit 1
exit 1
fi
fi
samtools sort -@ ${task.cpus} -O BAM -o ${file_id}_sorted.bam ${file_id}.bam
samtools index ${file_id}_sorted.bam
"""
"""
}
}
sorted_bam_files.into{sorted_bam_htseq; sorted_bam_coverage}
//
sorted_bam_files.into{sorted_bam_htseq; sorted_bam_coverage}
/* HTseq
/* HTseq
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment