Hi <#C0493FQQZ3P|> <#CE8SSJV3N|>, I am interested...
# rnasplice
m
Hi #C0493FQQZ3P #CE8SSJV3N, I am interested in performing isoform analysis on short read data (150bp) using the edgeR package, following the example from the edgeR User’s Guide, section: Refer: 4.6 Differential transcript expression of human lung adenocarcinoma cell lines I did wanted to try using the
quant.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.
Copy code
> 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 samples
#C0493FQQZ3P #CE8SSJV3N It seems probably add
--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
Copy code
"""
    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
    """
t
Try putting this in
salmon_quant.config
and use that with
-c
when you run the pipeline:
Copy code
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. 🤞
m
@Thomas Danhorn Thanks. Is my understanding correct? 1. Create a file named
salmon_quant.config
with the following content. This configuration targets both
SALMON_QUANT_STAR
and
SALMON_QUANT_SALMON
processes, adding the
--numGibbsSamples 50
argument.
Copy code
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:
Copy code
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?
Copy code
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
    }
}
t
I think your proposed config should work. I think the way I wrote it should work as well (as the actual process is called
SALMON_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 1
withName
in this
jax.config
file ...
You certainly can do that, the question is, should you? I personally would not combine these files. The
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.
m
@Thomas Danhorn Thank you very much for the guidance. Yes, you are right, it’s better to create separate files to add the rnasplice processes. I created a separate
rnasplice.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.
Copy code
process {
    // regex Match any process name that starts with 'SALMON_QUANT'
    withName: /SALMON_QUANT_.*/ {
        ext.args = '--numGibbsSamples 50'
    }
}
👍 1
t
If you are changing the same thing (e.g. memory for a specific process) in two config files, they will most likely override each other for that, but otherwise the contents of both files are used.
m
This is noted.
👍 1