Skip to content
Snippets Groups Projects
Commit 2a0b4e0f authored by Xavier Grand's avatar Xavier Grand
Browse files

src/nf_modules/star/main_2.7.8a.nf take into account available memory to limit...

src/nf_modules/star/main_2.7.8a.nf take into account available memory to limit file compression ressource.
parent a7d3716e
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ process index_with_gtf { ...@@ -34,6 +34,7 @@ process index_with_gtf {
tuple val(genome_id), path ("*"), emit: index tuple val(genome_id), path ("*"), emit: index
script: script:
memory = "${task.memory}" - ~/\s*GB/
""" """
STAR --runThreadN ${task.cpus} --runMode genomeGenerate \ STAR --runThreadN ${task.cpus} --runMode genomeGenerate \
--genomeDir ./ \ --genomeDir ./ \
...@@ -250,6 +251,7 @@ process mapping2fusion { ...@@ -250,6 +251,7 @@ process mapping2fusion {
tuple val(reads_id), path("*.bam"), emit: bam tuple val(reads_id), path("*.bam"), emit: bam
script: script:
memory = "${task.memory}" - ~/\s*GB/
if (reads_id instanceof List){ if (reads_id instanceof List){
file_prefix = reads_id[0] file_prefix = reads_id[0]
} else { } else {
...@@ -281,7 +283,8 @@ STAR --runThreadN ${task.cpus} \ ...@@ -281,7 +283,8 @@ STAR --runThreadN ${task.cpus} \
--chimScoreJunctionNonGTAG 0 \ --chimScoreJunctionNonGTAG 0 \
--chimScoreSeparation 1 \ --chimScoreSeparation 1 \
--chimSegmentReadGapMax 3 \ --chimSegmentReadGapMax 3 \
--chimMultimapNmax 50 --chimMultimapNmax 50 \
--limitBAMsortRAM ${memory}000000000
mv ${reads_id}.Aligned.sortedByCoord.out.bam ${reads_id}.bam mv ${reads_id}.Aligned.sortedByCoord.out.bam ${reads_id}.bam
""" """
...@@ -311,7 +314,8 @@ STAR --runThreadN ${task.cpus} \ ...@@ -311,7 +314,8 @@ STAR --runThreadN ${task.cpus} \
--chimScoreJunctionNonGTAG 0 \ --chimScoreJunctionNonGTAG 0 \
--chimScoreSeparation 1 \ --chimScoreSeparation 1 \
--chimSegmentReadGapMax 3 \ --chimSegmentReadGapMax 3 \
--chimMultimapNmax 50 --chimMultimapNmax 50 \
--limitBAMsortRAM ${memory}000000000
mv ${reads_id}.Aligned.sortedByCoord.out.bam ${reads_id}.bam mv ${reads_id}.Aligned.sortedByCoord.out.bam ${reads_id}.bam
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment