Skip to main content
163 votes
Accepted

Why does the SARS-Cov2 coronavirus genome end in aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (33 a's)?

Good observation! The 3' poly(A) tail is actually a very common feature of positive-strand RNA viruses, including coronaviruses and picornaviruses. For coronaviruses in particular, we know that the ...
Cody Gray - on strike's user avatar
62 votes
Accepted

What is the difference between FASTA, FASTQ, and SAM file formats?

Let’s start with what they have in common: All three formats store sequence data, and sequence metadata. Furthermore, all three formats are text-based. However, beyond that all three formats are ...
Konrad Rudolph's user avatar
49 votes
Accepted

Why does the FASTA sequence for coronavirus look like DNA, not RNA?

That is the correct sequence for 2019-nCov. Coronavirus is of course an RNA virus and in fact, to my knowledge, every RNA virus in Genbank is present as cDNA (AGCT, i.e. thydmine) and not RNA (AGCU, i....
M__'s user avatar
  • 12.5k
32 votes

Why does the SARS-Cov2 coronavirus genome end in aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (33 a's)?

This question is quite general, so I'm going to attempt to tie it back to bioinformatics. Background The tree for the current coronavirus is here, showing it is closely related to bat-coronavirus and ...
M__'s user avatar
  • 12.5k
29 votes
Accepted

Uppercase vs lowercase letters in reference genome

What does this soft masking actually mean? A lot of the sequence in genomes are repetitive. Human genome, for example, has (at least) two-third repetitive elements.[1]. These repetitive elements ...
Saket Choudhary's user avatar
26 votes
Accepted

What is the fastest way to calculate the number of unknown nucleotides in FASTA / FASTQ files?

For FASTQ: seqtk fqchk in.fq | head -2 It gives you percentage of "N" bases, not the exact count, though. For FASTA: ...
user172818's user avatar
  • 6,535
21 votes

Why does the SARS-Cov2 coronavirus genome end in aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (33 a's)?

Some of the other answers here seem quite good; at the same time I think the core answer to the OP's question is maybe a bit hard to tease out of them, so I'd like to try to state it more plainly. It'...
Zoë Sparks's user avatar
20 votes
Accepted

Read length distribution from FASTA file

If you want something quick and dirty you could rapidly index the FASTA with samtools faidx and then put the lengths column through R (other languages are available)...
Sam Nicholls's user avatar
19 votes

What is the difference between FASTA, FASTQ, and SAM file formats?

In a nutshell, FASTA file format is a DNA sequence format for specifying or representing DNA sequences and was first described by Pearson ...
eastafri's user avatar
  • 319
18 votes

What is the fastest way to calculate the number of unknown nucleotides in FASTA / FASTQ files?

5 hours and no benchmarks posted? I am sorely disappointed. I'll restrict the comparison to just be fasta files, since fastq will end up being the same. So far, the contenders are: R with the ...
Devon Ryan's user avatar
  • 19.6k
15 votes

How to convert FASTA to BED

You can do this easily with bioawk, which is a version of awk with added features facilitating bioinformatics: ...
bli's user avatar
  • 3,130
13 votes

How to convert FASTA to BED

It's good practice to have your FASTA indexed, so you can leverage the .fai you are likely to already have. If not, you can just ...
Sam Nicholls's user avatar
13 votes

Uppercase vs lowercase letters in reference genome

The use of lower/upper case letters and N/n letters in genomes sequences is not completely standardised and you should always ...
Chris_Rands's user avatar
  • 3,948
13 votes

What Ensembl genome version should I use for alignments? (e.g. toplevel.fa vs. primary_assembly.fa)

There's rarely a good reason to use a hard-masked genome (sometimes for blast, but that's it). For that reason, we use soft-masked genomes, which only have the benefit of showing roughly where repeats ...
Devon Ryan's user avatar
  • 19.6k
13 votes
Accepted

How to convert fasta file to tab delimited file

If you have multi-line fasta files, as is very common, you can use these scripts1 to convert between fasta and tbl (sequence_name <TAB> sequence) format: ...
terdon's user avatar
  • 10.2k
13 votes

Why does the SARS-Cov2 coronavirus genome end in aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (33 a's)?

Not an expert, but some searching on eukaryotic positive-strand RNA viruses seems to show that polyadenylation is not uncommon. For example, Steil, et al., 2010.
merv's user avatar
  • 651
12 votes

Read length distribution from FASTA file

Statistics for nanopore reads are tricky because of the huge range of read lengths that can be present in a single run. I have found that the best way to display lengths is by using a log scale on ...
gringer's user avatar
  • 14.3k
12 votes

How to convert fasta file to tab delimited file

There is a very simple BioPython solution, that is minimal, readable, and handles multi-line fasta: ...
Chris_Rands's user avatar
  • 3,948
11 votes
Accepted

Changing the record id in a FASTA file using BioPython

If I use SeqIO.parse(filehandle, 'fasta') to parse a FASTA file, then it will return a SeqRecord object where the ...
BioGeek's user avatar
  • 496
11 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,041
10 votes

What is the fastest way to calculate the number of unknown nucleotides in FASTA / FASTQ files?

I think that this should be pretty fast: FASTA: grep -v "^>" seqs.fa | tr -cd N | wc -c FASTQ: ...
Karel Břinda's user avatar
10 votes
Accepted

How do I rename fasta headers?

Why not use sed instead? sed -e 's/chr_I/I/' -e 's/chr_V/V/' -e 's/chr_X/X/' mySequence.fasta > mySeq.fasta Or even ...
benn's user avatar
  • 3,571
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
Accepted

What Ensembl genome version should I use for alignments? (e.g. toplevel.fa vs. primary_assembly.fa)

Generally, you should use the soft-masked or unmasked primary assembly. Cross-species whole-genome aligners, especially older ones, do need to know soft-masked regions; otherwise they can be ...
user172818's user avatar
  • 6,535
9 votes
Accepted

How to extract fasta from a blastdb

You can extract fasta sequence from a blastdb constructed from a fasta file using blastdbcmd which should be installed when you install blast/makeblastdb. ...
amblina's user avatar
  • 332
9 votes

Can FASTA files have nucleotide and protein sequences within them; or must they only have 1 type?

While there's nothing stopping anyone from doing that with the FASTA format (after all, it's just a text file with '>' defining header lines), I don't know of any software that would support such a ...
gringer's user avatar
  • 14.3k
9 votes

How to convert fasta file to tab delimited file

assuming there is only one sequence line per record, use paste with two 'stdin' cat your.fasta | paste - -
Pierre's user avatar
  • 1,536
9 votes
Accepted

Splitting fasta file into smaller files based on header pattern

Here's a simple awk approach: awk '{if(/^>/){split($1,a,"[|.]")}print >> a[2]".fa"}' Protein_FASTA.txt Or, more concisely, just: ...
terdon's user avatar
  • 10.2k
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

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