GenBank to FASTA
Reads GenBank and EMBL, writes FASTA. Paste a record or choose a file; nothing is uploaded.
Reads GenBank and EMBL, writes FASTA. Paste a record or choose a file; nothing is uploaded.
Paste the record, drop the file on the box or choose it from your device. The format is read from the file: a GenBank record begins with LOCUS and holds its sequence underORIGIN, an EMBL record begins with ID and holds its sequence under SQ. Both end with a line of two slashes, and a file may hold any number of records. The tool says which format it found, so nothing has to be chosen by hand.
The location decides which bases a feature is made of, and it is where converters usually go wrong. All coordinates are 1-based and both ends are included, so 19..201 is 183 bases.
| Location | Meaning | What is written |
|---|---|---|
| 19..201 | positions 19 to 201, plus strand | 183 bases |
| complement(100..204) | minus strand | reverse complement of those 105 bases |
| join(271..300,1..60) | two pieces read in that order, here across the origin of a circular record | the pieces joined, 90 bases |
| complement(join(11..60,101..160)) | joined first, then read on the minus strand | reverse complement of the joined 110 bases |
| <1..500 | the start is missing, the feature began before position 1 | from position 1 |
| 500..>800 | the end is missing, the feature goes on past 800 | to position 800, or to the last base if the record stops earlier |
| 102^103 | a site between two bases | nothing, there is no sequence |
| J00194.1:1..80 | a piece of another entry | skipped, with a warning |
order(...) is treated like join(...), and a location that cannot be read at all is reported with its text instead of being silently dropped.
"Try an example" on the Features tab loads a 300 bp circular plasmid record,PBT0001. With the feature type on CDS the result is 3 records, 246 bp:repA from join(271..300,1..60), 90 bp read across the origin;tetR from complement(100..204), 105 bp reverse complemented; and orfX from 210..>260, 51 bp of a feature whose end is marked as missing. Tick "Translate CDS to protein" and the same three become 29, 34 and 17 amino acids, 80 aa in all, each translated with table 11 because the record says/transl_table=11. Choose "All features" and the source feature and the tetR gene feature are written too, five records in all.
On the Whole sequence tab the example is an EMBL record, detected from its ID and SQ lines and written as one record of 240 bp headed>AB123456.1 Petunia hybrida partial mRNA for chalcone synthase (chs gene).
With "Translate CDS to protein" ticked, every CDS is translated after it has been cut out and, where needed, reverse complemented:
/codon_start is 1, 2 or 3 and says which base of the feature begins the first full codon; it is 2 or 3 for a CDS whose start is missing, marked < in the location./transl_table names the NCBI genetic code, for example 11 for bacteria and plastids, 2 for vertebrate mitochondria, 5 for invertebrate mitochondria. Without it the standard code is used. A trailing stop codon is left off the protein, and a stop in the middle is reported, because it usually means the location, the reading frame or the code is not what the tool assumed. Bases that do not make a full codon at the end are ignored, and an ambiguous codon becomes X.
In Whole sequence mode: the accession with its version if the record has one, otherwise the LOCUS or ID name, then the definition line. In Features mode: the feature name, its type, its location and the accession it came from, for example>tetR CDS complement(100..204) [PBT0001.1]. The name comes from/gene, then /locus_tag, then /product, or from the qualifier you pick; spaces become underscores and a repeated name gets a number, so every record stays unique.
Tidy headers, line width or stray characters with theFASTA cleaner, check lengths and GC with thesequence statistics tool, translate extracted genes yourself with the translation tool, or cut further pieces out by position with the range extractor.
Paste the record or choose the .gb, .gbk or .embl file. The format is detected from the file itself, the sequence under ORIGIN or SQ is written as one FASTA record, and the header is built from the accession and the definition line. Press Copy or Download. Several records in one file are converted in one go.
Switch to the Features tab and leave the feature type on CDS. Every CDS in the record is cut out of the sequence according to its location, reverse complemented when the location says complement, and written as its own FASTA record named after /gene, /locus_tag or /product. Tick "Translate CDS to protein" to get the amino acid sequence instead.
complement(100..204) means the feature is on the minus strand, so its sequence is the reverse complement of those positions. join(271..300,1..60) means the feature is made of two pieces read in that order, which is how spliced genes and features crossing the origin of a circular record are written. A < or > marks a partial end: the feature carries on beyond the position given. Only the bases the location names are written, cut back to fit the sequence in the file.
No. The protein is translated from the extracted nucleotides, using /codon_start to set the first codon and /transl_table to choose the genetic code, so what you get matches the sequence in the file. A protein that differs from /translation, or that has a stop codon in the middle, usually means the record uses an unusual code or a /transl_except, and the tool says so.
Files up to 50 MB are fine, and several records in one file are converted together. The record is parsed by the browser on your own device. For a whole bacterial genome flat file with thousands of features, a command-line tool such as seqret or Biopython is quicker.