Steve
  • Member for 10 months
  • Last seen this week
Removing duplicate FASTA sequences based on headers with Bash
4 votes

One way using awk: awk '/^>/ { f = !a[$0]++ } f' seqs.fa Explanation: The above is basically the same as: awk '/^>/ { f = !($0 in a); a[$0]++ } f' seqs.fa That is, for each header line (lines ...

View answer
Nextflow: No signature of Method: chr() is applicable for argument types; unknown variable
Accepted answer
3 votes

The documation re conditional scripts is useful here: Process scripts can contain conditional statements by simply prefixing the script block with the keyword script:. By doing that the interpreter ...

View answer
Ensembl Variant Effect Predictor (VEP) issue during execution
2 votes

You might prefer to run VEP in offline mode: Using --cache (without --offline) uses the local cache on disk to fetch most annotations, but allows database connections for some features (see cache ...

View answer
Nextflow error: can not invoke method minus () on null object
Accepted answer
2 votes

Channel names must consist only alphanumeric characters including underscores. Your channel called 'plink-data' contains a hyphen. This is problematic because it is interpreted as a minus() operation ...

View answer
Remove variable sequence component within a tree text file
1 votes

Lots of ways to do this, but here's one way using sed: sed 's/TRINITY_\([^_]\+\)_\([^_]\+\)_[^:]\+/\1_\2/g' file.tree The above applies a substitution to capture the first two fields using ...

View answer
How to copy only certain counts for genes in tsv file to new file in linux
1 votes

One way using awk: awk 'NR==1 || /^YL/ { print $0 }' file.tsv The default action is to print the line/record, so all you need is the condition: awk 'NR==1 || /^YL/' file.tsv

View answer
Use conditional in workflow in Nextflow dsl2
Accepted answer
1 votes

You can move that into your workflow definition. There's an example in the docs of how best to use workflow parameters: A workflow component can access any variable and parameter defined in the outer ...

View answer
Nextflow: Can I parameterize similar processes inside a for loop?
1 votes

You don't need to create processes in a loop when you have channels. The each qualifier allows you to repeat the execution of a process for each item in a collection. For example, the contents of '...

View answer
Manta SV caller: I can't find a file in the path specified by the user guide
Accepted answer
1 votes

The --config file option for Manta can be used to override the defaults in the global config file. If you type configManta.py -h, you'll see where the global config file has been installed. For me, it'...

View answer
Merge multiple channels each emits multiple files in nextflow
Accepted answer
1 votes

The merge operator is deprecated and will be removed from future Nextflow releases. You'll need instead the join operator to join by chromosome. You can use the fromFilePairs operator to quickly get ...

View answer
Input from multiple channel, merge and use in nextflow
Accepted answer
1 votes

I don't think you can unpack tuples using the each qualifier like that. You can, however, unpack them in the script block: process test { input: each triple from para1 script: ...

View answer
Nextflow: run sbatch (slurm job script) inside a process
Accepted answer
1 votes

Using Nextflow to submit jobs this way makes little sense, since: sbatch exits immediately after the script is successfully transferred to the Slurm controller and assigned a Slurm job ID. The batch ...

View answer
Nextflow: Runs without error, produce few but not all output files into output channel
Accepted answer
1 votes

I suspect your HRC_1000G_check_bim and hrc_sites_file channels are queue channels when they should be value channels. Please again see how multiple channels work. Also, third-party scripts, like your ...

View answer
Nextflow: ordering the execution of processes; outputs of process A are inputs of process B
Accepted answer
1 votes

Nextflow uses channels (asynchronous FIFO queues) to communicate between processes. The interaction between these processes, and ultimately the pipeline execution flow itself, is implicitly defined by ...

View answer
Remove/delete sequences by ID from multifasta
0 votes

One way using awk without getline: awk 'FNR==NR { a[$0]; next } /^>/ { f = !(substr($0, 2) in a) }f' ids.txt seqs.fa

View answer