Hi all, I've tried supplementing Trim Galore with ...
# rnaseq
k
Hi all, I've tried supplementing Trim Galore with adapter fasta files and my pipeline keeps failing with this error:
SUMMARISING RUN PARAMETERS
==========================
Input filename: sample1_trimmed_1.fastq.gz
Trimming mode: paired-end
Trim Galore version: 0.6.10
Cutadapt version: 4.9
Python version: could not detect
Number of cores used for trimming: 8
Quality Phred score cutoff: 20
Quality encoding type selected: ASCII+33
Adapter sequence: 'file:/path/to/adapters.fa' (user defined)
Maximum trimming error rate: 0.1 (default)
Optional adapter 2 sequence (only used for read 2 of paired-end files): 'file:/path/to/adapters2.fa'
Minimum required adapter overlap (stringency): 1 bp
Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp
Running FastQC on the data once trimming has completed
Running FastQC with the following extra arguments: '-t 12'
Output file(s) will be GZIP compressed
Cutadapt seems to be fairly up-to-date (version 4.9). Setting -j 8
Writing final adapter and quality trimmed output to sample1_trimmed_1_trimmed.fq.gz
>>> Now performing quality (cutoff '-q 20') and adapter trimming in a single pass for the adapter sequence: 'file:/path/to/adapters.fa' from file sample1_trimmed_1.fastq.gz <<<
This is cutadapt 4.9 with Python 3.12.8
Command line parameters: -j 8 -e 0.1 -q 20 -O 1 -a file:/path/to/adapters.fa sample1_trimmed_1.fastq.gz
[Errno 2] No such file or directory: '/path/to/adapters.fa'
Cutadapt terminated with exit signal: '256'.
Terminating Trim Galore run, please check error message(s) to get an idea what went wrong...
The adapter file exists and is listed with ls -l command from the work directory of failed task. Does anyone have any ideas what could be the issue? Thank you very much for the help
b
In my understanding, the -a option should list the actual sequence of the adapter (
'AGATCGGAAGAGC'
for example) and not the string '`file:/path/to/adapters.fa`'
k
Hi, according to the user manual it shoud be possible: cutadapt.readthedocs.io/en/stable/guide.html#… Nevertheless, thank you for the input
b
I see ...
Copy code
cutadapt -a "file:adapters.fa;min_overlap=5;noindels"
This bit of code from the manual tells me that you might wanna try putting your
file:/path/to/adapters.fa
string within double quotes. Try this
cutadapt -j 8 -e 0.1 -q 20 -O 1 -a "file:/path/to/adapters.fa" sample1_trimmed_1.fastq.gz
k
I forgot to mention that I provided the fasta file in double quotes via params.yaml file, by using --extra_trimgalore_args. I found here https://nfcore.slack.com/archives/CE8SSJV3N/p1712908739431839?thread_ts=1712882010.455179&amp;cid=CE8SSJV3N that the problem is that Nextflow can't read the file itself, but unfortunatelly the suggested workaround (
singularity.runOptions = "-B /some/path"
in the config file) for some reason also doesn't work for me...
t
Have you gotten this to work? If not, where are you running this? On a system (e.g. cluster) with multiple nodes, there is the potential that a file (system) is accessible for one (e.g. the head node), but not form another (e.g. compute node). If that is the case here, your only option is to move the file to a place that is accessible from all nodes.
k
Hi, I am running this on cluster and the file is accessible from both head and compute nodes. Unfortunatelly, I didn't get this to work, so I manually processed my fastq files and returned them back to the pipeline for further processing.
t
You are using
singularity
(or
apptainer
), right? (Otherwise the
singularity.runOptions
would not make sense.) If you want to debug this, you could try to start a container with
singularity shell -B /path/to/ /path/to/somecontainer.img
and see what
ls -l /path/to/adapters.fa
gives you. (
/path/to/somecontainer.img
can be any SIF file, if you ran the pipeline, you probably have some cached somewhere -- if you have
NXF_SINGULARITY_CACHEDIR
set [or
singularity.cacheDir
in your config], look there, otherwise in your
work
directory might have a
singularity
subdirectory with container files.)