Hot answers tagged

6 votes
Accepted

A bash script for running on a bunch of bam files

There are a couple ways to approach this, one is to create output files based on the BAM input file name - the other approach is to make a new folder (based on the ...
Scot's user avatar
  • 782
5 votes

Parallelize or qsub a bash script

What's best is quite subjective. My preference would be use Nextflow to abstract away the underlying job submission system and then use the sge executor to submit the jobs to the cluster. The only ...
Steve's user avatar
  • 3,079
5 votes

Easier / lazy way to convert an existing bash pipeline to nextflow pipeline?

If your objective is to convert Bash scripts into Nextflow code, you might find Viash (https://viash.io) a particularly useful open source tool. It automatically generates independent Nextflow modules ...
Andy Boschmans's user avatar
4 votes
Accepted

Manta "--exome: command not found"

You're missing a \ in the line before the one containing the --exome, so shell treats it as a new command, which is why you see ...
Ram RS's user avatar
  • 2,279
4 votes

How to join multiple large .tsv (> 20 GB, bed file) files by two identifier?

If you are open to a GNU/Linux solution, the following should be a good start: ...
haci's user avatar
  • 4,032
3 votes

Analysis of RNA sequencing with zUMIs

I'd advise you to keep away from ZUMIs unless you're doing the same workflow that it was designed for. I spent many days trying to sort out issues with that program, and eventually gave up; it wasn't ...
gringer's user avatar
  • 13.9k
3 votes
Accepted

Printing the results of for loop into a txt file

This command worked just by adding > file after done ...
Zizogolu's user avatar
  • 2,132
3 votes

Filtering columns from large file based on a column list

It's really just count[,col$V1]. Please learn about basic subsetting of columns and rows, it's simple yet powerful.
ATpoint's user avatar
  • 1,137
3 votes

Filtering columns from large file based on a column list

You can save time and memory by preprocessing your file before loading it into R. Use miller toolkit to manipulate csv or tab-delimited files using column names. ...
Timur Shtatland's user avatar
3 votes
Accepted

Passing strings for password, email authentication and download link

The cURL command to obtain the download link returns a JSON containing the URL. This can be parsed on the command line using jq and used to construct a command to download the file. For example, with ...
Steve's user avatar
  • 3,079
3 votes
Accepted

How can I give different names to files in a directory with a for loop in a bash script?

Here's what I use - along with an example you can modify as needed: ...
Scot's user avatar
  • 782
3 votes
Accepted

How can I change all text in a .tsv file to 1, except the first three fields?

Not an expert, but : awk 'BEGIN { FS = OFS = "\t" } { for(i=4; i<=6; i++) if($i ~ /^ *$/) {$i = 0} else {$i = 1} }; 1' Since you have a very specific ...
Sam's user avatar
  • 149
3 votes

How can I add a ";" at the end of each fasta header line in a file?

seqkit replace -p "$" -r ";" my.fasta > my.renamed.fasta Where -p is the pattern to match the end of ...
Ammar's user avatar
  • 143
2 votes

Easier / lazy way to convert an existing bash pipeline to nextflow pipeline?

Since you asked about templates, if your task is something rather generic, there is a good chance that a module, or several, that you can use to build your workflow exists in https://nf-co.re/modules ...
Niklas's user avatar
  • 106
2 votes

Easier / lazy way to convert an existing bash pipeline to nextflow pipeline?

The gist would be something like: ...
Devon Ryan's user avatar
  • 19.6k
2 votes

Parallelize or qsub a bash script

You may use asub (array job submitter) for this. Modify your script to myscript.sh: ...
user172818's user avatar
  • 6,525
2 votes

Run nextflow pipeline multiple times depending on length of a list

I think the answer to your question is the each input repeaters. You can also check Nextflow FAQ for the question on how to iterate over a process or a file. Not in ...
user324810's user avatar
  • 1,115
2 votes

Parallelize or qsub a bash script

Consider using a workflow language such as Snakemake, Nextflow or Cromwell to handle distributing the jobs for you. It will take a little more time investment upfront to set them up, but it will save ...
Pallie's user avatar
  • 688
2 votes

Dealing With Manta Limitations

Assuming you have paired-end Illumina reads mapped using BWA or BWA-MEM (with default parameters), these limitations are usually not much of a concern: Alignments cannot have an unknown read sequence ...
Steve's user avatar
  • 3,079
2 votes
Accepted

Singularity And CNV Kit

I like this question a lot. Firstly I don't know singularity, but I know Docker and it will be similar. docker exec is very similar. So for example the reasons are ...
M__'s user avatar
  • 12.1k
2 votes

How to join multiple large .tsv (> 20 GB, bed file) files by two identifier?

For joining / merging / intersecting bed files, you're better off using bedtools. It's unclear what you're trying to do with these steps, but I'm guessing it's something like the following: The ...
gringer's user avatar
  • 13.9k
2 votes

How can I give different names to files in a directory with a for loop in a bash script?

Something like this? This uses printf to create a zero-padded 3-digit number corresponding to 17 numbers from 1 to 17: ...
gringer's user avatar
  • 13.9k
2 votes
Accepted

How to calculate average from a column when consecutive cells are similar in different columns?

...
haci's user avatar
  • 4,032
1 vote

Filtering columns from large file based on a column list

Below code works perfectly of me. ...
bioinfonext's user avatar
1 vote
Accepted

Create bam from separate sam and header

I'd use GNU parallel. I've not tested this with real files but try it out, ensure the {} is passed to the process substitution: ...
Ram RS's user avatar
  • 2,279
1 vote
Accepted

Variant Filtering Using AnthonyOzerov/variant-filtering Github Repository And Python Errors

Apparently the format of the phenotype_to_genes.txt File changed, while at the time when this pipeline was published the file consisted of 7 columns, it only has 5 ...
Patrick's user avatar
  • 26
1 vote
Accepted

CNV Kit ` from . import commands ImportError: cannot import name 'commands' from '__main__'`

Could you download it from conda and try again? Its here, https://docs.conda.io/en/main/miniconda.html Then, ...
M__'s user avatar
  • 12.1k
1 vote

How to measure the total size of a fastq file in base pairs?

seqkit stats fastq.gz. Get SeqKit from https://bioinf.shenwei.me/seqkit/usage/
user3479780's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible