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
0e69faab
Commit
0e69faab
authored
Mar 12, 2020
by
elabaron
Browse files
Options
Downloads
Patches
Plain Diff
PAS-seq nf and config : fix beugs
parent
ac3dbc46
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/PASseq.config
+11
-44
11 additions, 44 deletions
src/PASseq.config
src/PASseq.nf
+22
-60
22 additions, 60 deletions
src/PASseq.nf
with
33 additions
and
104 deletions
src/PASseq.config
+
11
−
44
View file @
0e69faab
...
...
@@ -33,45 +33,16 @@ profiles {
queue
=
'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
penv
=
'openmp16'
}
withName
:
sort_bam
{
beforeScript
=
"source $baseDir/.conda_psmn.sh"
conda
=
"$baseDir/.conda_envs/samtools_1.7"
executor
=
"sge"
clusterOptions
=
"-cwd -V"
cpus
=
1
memory
=
"20GB"
time
=
"12h"
queue
=
'monointeldeb128,monointeldeb48,h48-E5-2670deb128,h6-E5-2667v4deb128'
}
withName
:
index_bam
{
beforeScript
=
"source $baseDir/.conda_psmn.sh"
conda
=
"$baseDir/.conda_envs/samtools_1.7"
executor
=
"sge"
clusterOptions
=
"-cwd -V"
cpus
=
1
memory
=
"20GB"
time
=
"12h"
queue
=
'monointeldeb128,monointeldeb48,h48-E5-2670deb128,h6-E5-2667v4deb128'
}
withName
:
dedup
{
beforeScript
=
"source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module
=
"umi_tools/1.0.0"
executor
=
"sge"
clusterOptions
=
"-cwd -V"
cpus
=
1
memory
=
"20GB"
time
=
"12h"
queue
=
'monointeldeb128,monointeldeb48,h48-E5-2670deb128,h6-E5-2667v4deb128'
}
withName
:
counting
{
withName
:
bam_to_bigwig
{
beforeScript
=
"source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module
=
"
htseq/0.11
.2"
module
=
"
deeptools/3.0
.2"
executor
=
"sge"
clusterOptions
=
"-cwd -V"
cpus
=
1
memory
=
"20GB"
time
=
"12h"
queue
=
'monointeldeb128,monointeldeb48,h48-E5-2670deb128,h6-E5-2667v4deb128'
cpus
=
16
memory
=
"30GB"
time
=
"24h"
queue
=
'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
penv
=
'openmp16'
}
}
}
...
...
@@ -91,17 +62,13 @@ profiles {
cpus
=
4
container
=
"lbmc/hisat2:2.1.0"
}
withName
:
sort_bam
{
container
=
"lbmc/samtools:1.7"
cpus
=
1
}
withName
:
index_bam
{
container
=
"lbmc/samtools:1.7"
cpus
=
1
cpus
=
4
}
withName
:
dedup
{
container
=
"lbmc/
umi_
tools:
1
.0.
0
"
cpus
=
1
withName
:
bam_to_bigwig
{
container
=
"lbmc/
deep
tools:
3
.0.
2
"
cpus
=
4
}
withName
:
counting
{
container
=
"lbmc/htseq:0.11.2"
...
...
This diff is collapsed.
Click to expand it.
src/PASseq.nf
+
22
−
60
View file @
0e69faab
...
...
@@ -55,8 +55,14 @@ process rRNA_removal {
file
"*.txt"
into
bowtie_report
script:
index_id
=
index
[
0
]
for
(
index_file
in
index
)
{
if
(
index_file
=~
/.*\.1\.bt2/
&&
!(
index_file
=~
/.*\.rev\.1\.bt2/
))
{
index_id
=
(
index_file
=~
/(.*)\.1\.bt2/
)[
0
][
1
]
}
}
"""
zcat ${reads} | bowtie2 --sensitive -p ${task.cpus} -x
human_rRNA_tRNA
\
zcat ${reads} | bowtie2 --sensitive -p ${task.cpus} -x
${index_id}
\
-U - --un-gz ${file_id}_mRNA.fastq.gz 2> \
${file_id}_bowtie2_report.txt > /dev/null
...
...
@@ -92,11 +98,17 @@ process hisat2_human {
file
"*.txt"
into
hisat_report
script:
index_id
=
index
[
0
]
for
(
index_file
in
index
)
{
if
(
index_file
=~
/.*\.1\.ht2/
&&
!(
index_file
=~
/.*\.rev\.1\.ht2/
))
{
index_id
=
(
index_file
=~
/(.*)\.1\.ht2/
)[
0
][
1
]
}
}
"""
hisat2 -x
genome_tran
-p ${task.cpus} \
-U ${fastq_filtred} --un-gz ${file_id}_notaligned
_hg38
.fastq.gz \
hisat2 -x
${index_id}
-p ${task.cpus} \
-U ${fastq_filtred} --un-gz ${file_id}_notaligned.fastq.gz \
--end-to-end --rna-strandness 'F' \
2> ${file_id}_hisat2
_hg38
.txt | samtools view -bS -F 4 -o ${file_id}.bam
2> ${file_id}_hisat2.txt | samtools view -bS -F 4 -o ${file_id}.bam
"""
}
...
...
@@ -105,64 +117,25 @@ hisat2 -x genome_tran -p ${task.cpus} \
process
index_bam
{
tag
"$file_id"
publishDir
"${params.output}/03_
hisat2_hg38
/"
,
mode:
'copy'
publishDir
"${params.output}/03_
mapping
/"
,
mode:
'copy'
input:
set
file_id
,
file
(
bam
)
from
reads_aligned_hg38
file
report
from
hisat_report
output:
set
file_id
,
"*_sorted.{bam,bam.bai}"
into
sorted_bam_files
file
"*.log"
into
hisat_report_bis
script:
"""
samtools sort -@ ${task.cpus} -O BAM -o ${file_id}_sorted.bam ${bam}
samtools index ${file_id}_sorted.bam
cat ${report} > ${file_id}.log
"""
}
sorted_bam_files
.
into
{
for_dedup
;
for_htseq
}
/* deduplicating reads */
params
.
dedup_options
=
""
process
dedup
{
tag
"$file_id"
input:
set
file_id
,
file
(
bam
)
from
for_dedup
output:
set
file_id
,
"*dedup.bam"
into
dedup_bam
file
"*.txt"
into
dedup_report
script:
"""
umi_tools dedup -I ${bam[0]} \
${params.dedup_options} \
-S ${file_id}_dedup.bam > report.txt
"""
}
process
sort_bam
{
tag
"$file_id"
publishDir
"${params.output}/03_hisat2_hg38_dedup/"
,
mode:
'copy'
input:
set
file_id
,
file
(
bam
)
from
dedup_bam
file
dedup
from
dedup_report
output:
set
file_id
,
"*_sorted.{bam,bam.bai}"
into
sorted_bam_files_2
file
"*.txt"
into
report_dedup
script:
"""
samtools sort -@ ${task.cpus} -O BAM -o ${file_id}_sorted.bam ${bam}
samtools index ${file_id}_sorted.bam
cat ${dedup} > ${file_id}_dedup_report.txt
"""
}
sorted_bam_files
.
into
{
for_htseq
}
/* HTseq */
...
...
@@ -188,22 +161,11 @@ process counting {
script:
"""
htseq-count ${bam[0]} ${gtf} \
--mode=intersection-nonempty \
-a 10 \
-s yes \
-t CDS \
-i gene_id \
-r pos \
-f bam \
> ${file_id}_CDS.count
htseq-count ${bam[0]} ${gtf} \
--mode=intersection-nonempty \
--mode=union \
-a 10 \
-s yes \
-t exon \
-i gene_id \
-r pos \
-f bam \
> ${file_id}_exon.count
...
...
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