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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
RMI2
RMI2 pipelines
Commits
fb686f83
Commit
fb686f83
authored
4 years ago
by
elabaron
Browse files
Options
Downloads
Patches
Plain Diff
src/RNAseq.nf : cosmetic changes
parent
ba8ad15c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/RNAseq.nf
+78
-32
78 additions, 32 deletions
src/RNAseq.nf
with
78 additions
and
32 deletions
src/RNAseq.nf
+
78
−
32
View file @
fb686f83
...
...
@@ -2,18 +2,41 @@
* RNAseq Analysis pipeline
*/
//////////////////////////////////////////////////////
// PARAMETERS //
//////////////////////////////////////////////////////
///////////////////////
// PARMS : FILE PATH //
///////////////////////
params
.
fastq_raw
=
"data/fastq/*{_R1,_R2}.fastq.gz"
params
.
output
=
"results"
params
.
do_fastqc
=
true
//params.script_cov = "src/norm_coverage.sh"
params
.
filter
=
"data/filter/human_rRNA_tRNA/*.bt2"
params
.
index_genome
=
"data/genome/*.ht2"
params
.
do_dedup
=
true
params
.
gtf
=
"data/annotation/*.gtf"
params
.
gtf_collapse
=
"data/annotation/*.gtf"
params
.
index_postgenome
=
"data/post_genome/*.ht2"
/////////////////////
// PARMS : OPTIONS //
/////////////////////
params
.
do_fastqc
=
true
params
.
do_dedup
=
true
params
.
do_postgenome
=
true
////////////////////////
// ADAPTORS SEQUENCES //
////////////////////////
params
.
adaptorR1
=
"AGATCGGAAGAGCACACGTCTGAACTCCAGTCA"
params
.
adaptorR2
=
"AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT"
//////////////
// LOG INFO //
//////////////
log
.
info
"input raw : ${params.fastq_raw}"
log
.
info
"outut directory : ${params.output}"
log
.
info
"filter index files : ${params.filter}"
...
...
@@ -27,6 +50,10 @@ log.info "do deduplication ? : ${params.do_dedup}"
log
.
info
"do post genome alignement ? : ${params.do_postgenome}"
log
.
info
""
//////////////
// CHANNELS //
//////////////
Channel
.
fromFilePairs
(
params
.
fastq_raw
)
.
ifEmpty
{
error
"Cannot find any file matching: ${params.fastq_raw}"
}
...
...
@@ -58,7 +85,18 @@ Channel
.
ifEmpty
{
error
"Cannot find any index files matching: ${params.index_postgenome}"
}
.
set
{
POSTGENOME_INDEX
}
//////////////////////////////////////////////////////
// PROCESS //
//////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
//////////////////////////// PRE PROCESS ///////////////////////////////
////////////////////////////////////////////////////////////////////////
/////////////////////////
/* Fastqc of raw input */
/////////////////////////
process
fastqc_raw
{
tag
"$file_id"
...
...
@@ -77,7 +115,10 @@ process fastqc_raw {
fastqc ${file_id}* -t ${task.cpus}
"""
}
///////////////////////
/* Trimming adaptors */
///////////////////////
process
trimming
{
tag
"$file_id"
...
...
@@ -119,7 +160,10 @@ process trimming {
CUTADAPT_OUTPUT
.
into
{
CUTADAPT_OUTPUT_FASTQC
;
CUTADAPT_OUTPUT_FILTER
}
/////////////////////////
/* Fastqc of raw input */
/////////////////////////
process
fastqc_cut
{
tag
"$file_id"
...
...
@@ -139,7 +183,9 @@ process fastqc_cut {
"""
}
/////////////////////////////
/* rRNA and tRNA filtering */
/////////////////////////////
process
rRNA_removal
{
tag
"$file_id"
...
...
@@ -181,7 +227,9 @@ FILTER_FASTQ.into{FILTER_FASTQ_FASTQC;
FILTER_FASTQ_POSTGENOME
}
/////////////////////////////
/* Fastqc of filtred reads */
/////////////////////////////
process
fastqc_filter
{
tag
"$file_id"
...
...
@@ -201,7 +249,15 @@ process fastqc_filter {
"""
}
///////////////////////////////////////////////////////////////////
//////////////////////////// GENOME ///////////////////////////////
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////
/* mapping against human genome with hisat2 */
///////////////////////////////////////////////
process
hisat2_human
{
tag
"$file_id"
...
...
@@ -245,8 +301,9 @@ fi
HISAT_ALIGNED
.
into
{
HISAT_ALIGNED_FASTQC
;
HISAT_ALIGNED_DEDUP
}
////////////////////////////
/* Fastqc of genome reads */
////////////////////////////
process
fastqc_genome
{
tag
"$file_id"
...
...
@@ -266,7 +323,9 @@ process fastqc_genome {
"""
}
////////////////////////////
/* Deduplication of reads */
////////////////////////////
process
dedup_genome
{
tag
"$file_id"
...
...
@@ -297,7 +356,9 @@ DEDUP_GENOME.into{DEDUP_GENOME_HTSEQ;
DEDUP_GENOME_RNASEQC
}
/* HTseq */
///////////
/* HTseq */
///////////
process
sort_bam
{
tag
"$file_id"
...
...
@@ -348,7 +409,9 @@ htseq-count ${bam[0]} ${gtf} \
"""
}
/* HTseq */
///////////////
/* RNASEQ QC */
///////////////
process
rnaseq_qc
{
tag
"$file_id"
...
...
@@ -372,8 +435,9 @@ rnaseqc ${gtf} ${bam[0]} -s ${file_id} ./ \
//////////////////////////// POST GENOME ///////////////////////////////
////////////////////////////////////////////////////////////////////////
/////////////////////////
/* HISAT2 POST_GENOMIC */
/////////////////////////
process
hisat2_postGenomic
{
tag
"$file_id"
...
...
@@ -418,7 +482,9 @@ fi
POSTGENOME_ALIGNED
.
into
{
POSTGENOME_ALIGNED_FASTQC
;
POSTGENOME_ALIGNED_DEDUP
}
////////////////////////////
/* Deduplication of reads */
////////////////////////////
process
dedup_postgenome
{
tag
"$file_id"
...
...
@@ -459,34 +525,14 @@ process fastqc_postgenome {
"""
}
/*
Channel
.fromFilePairs(params.script_cov)
.ifEmpty { error "Cannot find any file matching: ${params.script_cov}" }
.set {script_channel}
process coverage {
tag "$file_id"
publishDir "${params.output}/05_coverage/", mode: 'copy'
input:
set file_id, file(bam) from sorted_bam_coverage
set script from script_channel.collect()
output:
file "*.bw" into coverage_files
////////////////////////////////////////////////////////////////////////
//////////////////////////// POST PROCESS //////////////////////////////
////////////////////////////////////////////////////////////////////////
script:
"""
bash ${script} -b ${bam} \
-o {file_id}.bw \
--binSize 1 \
-p ${cpus} 8
"""
}
*/
/////////////
/* MultiQC */
/////////////
process
multiqc
{
...
...
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