Mohammed Toufiq
11/28/2024, 9:16 PMquant.sf files from the /salmon run by referring edgeR user guide. I tried the below steps, but I see there are NA values in the Overdispersion. Probably nf-core rnasplice did not run with bootstrap/gibbs replicates, Salmon with inferential replicates: ? I there a way in the code to turn that on.
> setwd("/projects/RNA/salmon/")
> quant <- dirname(list.files(".", "quant.sf", recursive = TRUE, full.names = TRUE))
> print(quant)
[1] "./DD21_progenitors" "./DD39_progenitors" "./DD48_progenitors" "./DD98_progenitors"
> catch <- catchSalmon(paths = quant)
Reading ./DD21_progenitors, 427366 transcripts, 0 none samples
Reading ./DD39_progenitors, 427366 transcripts, 0 none samples
Reading ./DD48_progenitors, 427366 transcripts, 0 none samples
Reading ./DD98_progenitors, 427366 transcripts, 0 none samplesMohammed Toufiq
11/29/2024, 6:57 PM--numGibbsSamples 50 Does it makes sense to modify and in main.nf file in the path below or may add specific parameter in bash script. nfcore_rnasplice/1_0_4/rnasplice/modules/nf-core/salmon/quant
"""
salmon quant \\
--geneMap $gtf \\
--threads $task.cpus \\
--libType=$strandedness \\
--numGibbsSamples 50 \\
$reference \\
$input_reads \\
$args \\
-o $prefix
if [ -f $prefix/aux_info/meta_info.json ]; then
cp $prefix/aux_info/meta_info.json "${prefix}_meta_info.json"
fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g")
END_VERSIONS
"""Thomas Danhorn
12/02/2024, 7:07 AMsalmon_quant.config and use that with -c when you run the pipeline:
process {
withName: 'SALMON_QUANT' {
ext.args = '--numGibbsSamples 50'
}
}
This process is used with different names, depending on context (SALMON_QUANT_STAR and SALMON_QUANT_SALMON), I hope it works with the original name. If not, we'll have to use a regex.
Normally you would need to copy the ext.args from the original config (in this case in conf/modules.config), but there is no ext.args for this process.
You can see if it worked by checking the command for the process as discussed before. 🤞Mohammed Toufiq
12/02/2024, 1:32 PMsalmon_quant.config with the following content. This configuration targets both SALMON_QUANT_STAR and SALMON_QUANT_SALMON processes, adding the --numGibbsSamples 50 argument.
process {
withName: 'SALMON_QUANT_STAR' {
ext.args = '--numGibbsSamples 50'
}
withName: 'SALMON_QUANT_SALMON' {
ext.args = '--numGibbsSamples 50'
}
}
2. Update my pipeline script run_rnasplice.sh script to include the custom configuration file using the -c option:
nextflow run /projects/toufim/nfcore_rnasplice/1_0_4/rnasplice \
--input /flashscratch/toufim/23_Palucka_003_004_samplesheet.csv \
--contrasts /flashscratch/toufim/23_Palucka_003_004_Contrastsheet.csv \
--outdir /flashscratch/toufim/ \
--star_index /projects/STAR_INDEX/STAR_Index_GENCODE/hg38_sjdbOver_150_merged_gtf/ref/ \
--fasta /projects/STAR_INDEX/STAR_Index_GENCODE/hg38_sjdbOver_150_merged_gtf/hg38.fa \
--gtf /projects/STAR_INDEX/STAR_Index_GENCODE/hg38_sjdbOver_150_merged_gtf/LUAD_v3.gencode_v44.merged.gtf \
--aligner star \
--gencode true \
--gtf_extra_attributes gene_id \
--rmats_paired_stats false \
--rmats_read_len 151 \
--sashimi_plot false \
--dexseq_dtu false \
-profile jax \
-c /flashscratch/singularity_cache_nfcore/jax.config \
-c /flashscratch/singularity_cache_nfcore/salmon_quant.config \
-resume
3. Run the script
Ps: This how my current part of jax.config file looks, a question, instead of creating a new salmon_quant.config, does it allow to add point 1 withName in this jax.config file so I can use one file only?
singularity {
enabled = true
autoMounts = true
cacheDir = params.singularity_cache_dir
}
params {
max_memory = 720.GB
max_cpus = 32
max_time = 336.h
}
process {
withLabel: custom_mem {
cpus = 32
memory = 720.GB
queue = 'compute'
}
}
process {
// Add the specific memory setting for the RMATS process
withName: NFCORE_RNASPLICE:RNASPLICE:RMATS:RMATS_POST {
memory = 100.GB
}
// Add the specific memory setting for the RMATS process
withName: NFCORE_RNASPLICE:RNASPLICE:SALMON_QUANT_STAR {
memory = 100.GB
}
// Add the specific memory setting for the RMATS process
withName: NFCORE_RNASPLICE:RNASPLICE:ALIGN_STAR:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX {
memory = 100.GB
}
}Thomas Danhorn
12/02/2024, 7:55 PMSALMON_QUANT, the other names are aliases to allow for different configs), or you could use a regex to capture both of the names in a single withName: clause. It's a question of taste, use whatever works for you.
... does it allow to add point 1You certainly can do that, the question is, should you? I personally would not combine these files. Thein thiswithNamefile ...jax.config
jax.config is a general config file that tells an nf-core pipeline about your cluster. You could potentially use that with any Nextflow/nf-core pipeline. In fact, I would remove the rnasplice-specific clauses from jax.config and put them into a separate file. E.g., you could rename the salmon_quant.config to rnasplice.config and put everything specific to that pipeline in there, unless there might be cases where you want to run the pipeline with one part, but not the other part of that config, in which case separate files are better.Mohammed Toufiq
12/04/2024, 1:17 AMrnasplice.config file and added the process with regex (see below), and it worked. The other workaround (having one config file) also worked. Initially, I thought having two -c config files would override one another, so I considered including everything together in one config file.
process {
// regex Match any process name that starts with 'SALMON_QUANT'
withName: /SALMON_QUANT_.*/ {
ext.args = '--numGibbsSamples 50'
}
}Thomas Danhorn
12/04/2024, 4:47 AMMohammed Toufiq
12/04/2024, 1:55 PM