-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User provided --three_prime_adapter is not recognised #41
Comments
hum, can you try with the original code and |
hmm, I thought that had fixed it and had started making a pull request to suggest adding that information to the documentation (there is no indication that Upon inspection it seems that -p, --protocol One of the following (read structure schematic in parens):
illumina (miRNA--3'-adapter--index) [DEFAULT]
qiaseq (miRNA--3'-adapter--UMI--3'-adapter--index)
NOTE: Only the first (leftmost) 3' adapter should be specified.
cats (NNN--miRNA--poly-A--3'-adapter--index)
NOTE: It's not possible to specify an adapter for -p cats.
nextflex (NNNN--miRNA--NNNN--3'-adapter--index) I haven't come across miRtrace before (nice tool though) so I am unsure of it's inner workings. In the documentation for miRtrace it states that -p/--protocol is an optional argument, so I tested removing that line from STEP 7 in /*
* STEP 7 - miRTrace
*/
process mirtrace {
tag "$reads"
publishDir "${params.outdir}/miRTrace", mode: 'copy'
input:
file reads from raw_reads_mirtrace.collect()
output:
file '*mirtrace' into mirtrace_results
script:
primer = (protocol=="cats") ? " " : " --adapter $three_prime_adapter "
"""
for i in $reads
do
path=\$(realpath \${i})
prefix=\$(echo \${i} | sed -e "s/.gz//" -e "s/.fastq//" -e "s/.fq//" -e "s/_val_1//" -e "s/_trimmed//" -e "s/_R1//" -e "s/.R1//")
echo \$path","\$prefix
done > mirtrace_config
mirtrace qc \\
--species $params.mirtrace_species \\
$primer \\
// --protocol $protocol \\ # removed this argument
--config mirtrace_config \\
--write-fasta \\
--output-dir mirtrace \\
--force
"""
} Running with the above modification and I am happy to make a pull request but thought it might be worth highlighting this first in case it has unexpected consequences. |
Maybe something like this would be a little bit better:
primer = (protocol==“cats” or protocol==“custom”) ? " " : " --adapter
$three_prime_adapter “
And not to remove the protocol lines.
Does that works?
|
I'm not at all familiar with NextFlow, so am probably doing something wrong, but your suggestion didn't work (most likely a syntax issue on my end): N E X T F L O W ~ version 20.01.0
Launching `/store/mbenton/smrnaseq/main.nf` [voluminous_swirles] - revision: 47b2ec65ce
WARN: It appears you have never run this project before -- Option `-resume` is ignored
Script compilation error
- file : /store/mbenton/smrnaseq/main.nf
- cause: expecting ')', found 'or' @ line 717, column 33.
primer = (protocol==“cats” or protocol==“custom”) ? " " : " --adapter $three_prime_adapter "
^
1 error I still struggle to see how the suggested fix will happily pass to through miRtrace as "custom" won't be recognised as a protocol., right? |
sorry you are right, we need a new line that put only protocols when is custom. I need to test it, something like this:
and then:
|
Nice, I made those changes and have run a test set through - everything seems to be working as expected. Would you like me to make a pull request or would you prefer to do it and do some more testing? |
yes, do the PR please. It will take some time to merge because we need to update the TEMPLATE branch to the last version, but is good the PR is there. Probably the test will fail but not because your changes. :) |
OK, done - see pull request #42. I also added a little more documentation making it clearer that I think there is another 'issue' that needs addressing in terms of maybe just clearer documentation around user provided arguments. It's not clear that when using a defined |
I still get an error using the option "--protocol custom" when trying to use specific adapter sequences. N E X T F L O W ~ version 21.04.3 The following runs with no problem at all: However the following stops due to an error: I also would like to be able to input multiple sequence adapters to be passed to cutadapt, but well already with one I'm not being successful. My workaround so far is to remove adapters using cutadapt on my own, and then pass the already trimmed fastq files to smrnaseq v1.1.0 with no protocol option (default settings). But getting this option to work would be great, Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'mirtrace Command error: ERROR: Invalid --protocol argument: custom |
Thank you for reporting, I see this is actually a code issue. The problem with that tool is that I don't know how it will run in this case. Do you know how the command line should look like for your case? Then I can try to find the logic in the code. |
Yes. I directly use cutadapt. I actually tune a bit several parameters, but my basic line would look like: cutadapt --adapter AGATCGGAAGAGCACACGTCT --adapter GATCGGAAGAGCACACGTCTGAACTCCAGTCAC -q 10,10 --minimum-length 15 <input.fq.gz> (cutadapt can take more than 1 custom adapter sequence and trim either if present) trim_galore --adapter AGATCGGAAGAGCACACGTCT --adapter GATCGGAAGAGCACACGTCTGAACTCCAGTCAC --quality 10 --length 15 <input.fq.gz> |
Thank you, that is good to know. Could you find a command line for mirtrace that will work with your trimmed files? |
late to the convo, but to shoehorn @JRodrigoF's case through Illumina adapters clip directly adjacent to their inserts, so if your kit's adapters do the same then they are structurally identical to the Illumina protocol, save for the different 3' adapter sequence |
New here, and having the some problems. My quick workaround was just to edit the main.nf file (see below) and replace TGGAATTCTCGGGTGCCAAGG with my adapter sequence. There's probably a better way to do this. if (params.protocol == "illumina"){ |
Important! Template update for nf-core/tools v2.4
When running on several small RNASeq data sets we have in house no miRNA are being detected. Upon inspecting the trimmed files they are all in the order of ~80Kb in size, and checking the trimming logs the issue is that the adapter being used isn't the one provided by the user.
This is the command being used:
However the adapter being reported in the trimming output is
TGGAATTCTCGGGTGCCAAGG
- the adapter that is defined in the illumina protocol.When I clone the pipeline and
edithack the illumina protocol adapter to be the one we want to use for trimming everything works as expected:So for some reason the 'custom' user defined adapter parameter isn't being assigned or the illumina protocol is taking precedence. I haven't had time to dig into this anymore but am happy to do some more testing if required.
The text was updated successfully, but these errors were encountered: