Hot answers tagged

18 votes
Accepted

Using shells other than bash

Bioinformatics tools written in shell and other shell scripts generally specify the shell they want to use (via #!/bin/sh or e.g. ...
John Marshall's user avatar
11 votes

Using shells other than bash

TL;DR SH adheres to an official industry standard, but it is not suitable for scientific computing. Bash is considered an informal standard (e.g., by Google). Bash 3 is preferable in most of ...
Karel Břinda's user avatar
10 votes
Accepted

How to run same command on multiple files?

Another solution for repeating one command with different parameters is to use parallel. Create a tab-delimited file samples.txt...
finswimmer's user avatar
  • 1,342
10 votes
Accepted

How to download FASTA sequences from NCBI using the terminal?

Alternatively, you can use the NCBI Entrez Direct UNIX E-utilities Basically, you have to download the install file here: https://www.ncbi.nlm.nih.gov/books/NBK179288/bin/install-edirect.sh In the ...
dc37's user avatar
  • 1,021
10 votes

Removing duplicate FASTA sequences based on headers with Bash

If you want to avoid using extra libraries for any reason, you can just use a simple Python script (version 3.6 and above) to do this: ...
Bioinfomrat's user avatar
9 votes

What are the available cloud computing services for bioinformatics?

I have trialed the free version of InsideDNA, and these were my notes: Cost: \$225/month for a team of 5 with 50TB storage or \$45/month with 10TB storage for individuals (assuming 6 month package: ...
Chris_Rands's user avatar
  • 3,928
9 votes

How I can change the name of multiple files at once in R or terminal?

Use perl-rename. This is usually called rename on Debian-based systems like Ubuntu or Mint, and ...
terdon's user avatar
  • 9,442
9 votes

Removing duplicate FASTA sequences based on headers with Bash

You can use seqkit for this purpose. seqkit rmdup -n seqs.fa -o seqs_without_duplicate.fa
Mr_Z's user avatar
  • 629
8 votes

How to run same command on multiple files?

Something like this might do it: ...
Jay Moore's user avatar
  • 1,012
8 votes

Edit FASTA header using sed

awk 'BEGIN{FS="::"}{if($1~">"){printf(">%s_%s\n",$2,substr($1,2))}else{print $0}}' input_file.fa > output.fa An explanation of the non-obvious bits: <...
Devon Ryan's user avatar
  • 19.5k
7 votes
Accepted

Script to run everything in a loop for extracting tar.gz files into fastq and to bam with alignment?

This should work for you: ...
heathobrien's user avatar
  • 1,816
7 votes

Using shells other than bash

The Open Group Base Specifications Issue 7 IEEE Std 1003.1™-2008, 2016 Edition, or "The POSIX Standard" for short, is the standard that defines the interfaces and utilities provided by a Unix system. ...
Kusalananda's user avatar
6 votes
Accepted

Downloading multiple SRA files from several SRA accession IDs does not work

First of all, the brace expansion you tried to use isn't valid. While bash can expand {1..3} to 1 2 3, it has no way of knowing ...
terdon's user avatar
  • 9,442
5 votes

How to run same command on multiple files?

if you have a repeating workflow, I strongly recommend to have a look at workflow management systems like snakemake. I've also wrote a little tutorial on biostars about this topic, which might be ...
finswimmer's user avatar
  • 1,342
5 votes

finding unique headers in a fasta file using linux command line

If you just want the number of unique headers, you can do this: grep '>' reference.fasta | sort | uniq | wc -l If you want a list of the unique headers, you ...
conchoecia's user avatar
  • 3,141
5 votes

Using shells other than bash

The generic command sh is quite literally an industry standard, a POSIX standard, to be precise (IEEE 1003.2 and 1003.2a, available for purchase for hundreds of ...
gringer's user avatar
  • 13.5k
5 votes

Using shells other than bash

I would not say bash as a "standard", but it is indeed likely to be the most widely used unix shell and available by default on most modern unix/linux distros. There are a few other more convenient ...
user172818's user avatar
  • 6,435
5 votes

What are the available cloud computing services for bioinformatics?

I'm not sure what kinds of bioinformatics tasks you would like to perform, therefore it is difficult to give a good recommendation. If you're specifically working on statistical genetics, I can ...
Daniel King's user avatar
5 votes
Accepted

How I can change the name of multiple files at once in R or terminal?

just to complete your question, you can do it in R in one line. After setting the directory as your working directory, just type the following: ...
dc37's user avatar
  • 1,021
5 votes
Accepted

How can I run a command for multiple files?

Assuming all your vcfs are in the same folder: ...
h3ab74's user avatar
  • 836
5 votes
Accepted

Changing this code in a way to work for my files

Using shell loops for text practice is considered bad practice. It is exceedingly slow, the syntax is complicated so it's very easy to get it wrong and it's just painful. The shell isn't designed as a ...
terdon's user avatar
  • 9,442
5 votes

How to get a file with the number of reads for several fastq.gz files?

One way would be to use seqkit stats, which can be installed using conda: ...
Steve's user avatar
  • 3,024
5 votes

How to loop over certain files within a directory that belongs to certain samples

You can certainly use a for loop for this if desired, but an easier method is to use the cat command - something like this: ...
Scot's user avatar
  • 782
4 votes

What are the available cloud computing services for bioinformatics?

Depending on your applications and uses, you might be interested in checking out CyVerse. It is an NSF funded initiative that provides you with data storage, high performance computing resources, and ...
G_Hannigan's user avatar
4 votes
Accepted

What are the available cloud computing services for bioinformatics?

It really depends on what you are trying to do, but here are a few services that I know of. GATK on Google Genomics Cloud: Google and the Broad offer a cloud instance tailored to GATK pipelines. ...
woemler's user avatar
  • 429
4 votes

Installing DESeq2 in Ubuntu

First I installed this libraries: sudo apt-get install libcurl4-openssl-dev libxml2-dev I then installed RCurl: ...
aerijman's user avatar
  • 635
4 votes

How to download FASTA sequences from NCBI using the terminal?

Just wget or curl each as ...
Matteo Ferla's user avatar
  • 4,174
4 votes
Accepted

How to convert mzXML to mzML format (mass spectrometry files)?

ProteoWizard offers this functionality: msconvert your_mzXML_file --mzML FileConverter of ...
haci's user avatar
  • 3,892

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