Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Sequence File formats and
format conversion tools
Dinesh Gupta (ICGEB, New
Delhi, India)
5/23/2017 10:32:54 AM
Why different formats
• Organised sequence information
• Database integration
5/23/2017 10:32:54 AM
Main file formats used in Bioinformatics
•ASN.1
•EMBL Swiss Prot
•FASTA
•GCG
•GenBank/GenPept
•Nexus
•PHYLIP
•NBRF and PIR
5/23/2017 10:32:54 AM
ASN 1: Abstract Syntax Notation 1
used by NCBI
Seq-entry ::= set {
class phy-set ,
descr {
pub {
pub {
article {
title {
name "Cross-species infection of blood parasites between resident
and migratory songbirds in Africa" } ,
authors {
names
std {
{
name
name {
last "Waldenstroem" ,
first "Jonas" ,
initials "J." } } ,
{
name
name {
last "Bensch" ,
first "Staffan" ,
initials "S." } } ,
{
name
name {
last "Kiboi" ,
first "Sam" ,
initials "S." } } ,
{
name
name {
last "Hasselquist" ,
first "Dennis" ,
initials "D." } } ,
{
5/23/2017
10:32:54 AM
name
name {
EMBL/Swiss Prot
(http://www.ebi.ac.uk/help/formats_frame.html)
• The first line of each sequence entry is the ID definition line which contains entry name,
dataclass, molecule, division and sequence length.
• XX line contains no data, just a separator
• The AC line lists the accession number.
• DE line gives description about the sequence
• FT precise annotation for the sequence
• aa Sequence information SQ in the first two spaces.
• The nucleotide sequence begins on the fifth line of the sequence entry.
• The last line of each sequence entry in the file is a terminator line which has the two
characters // in the first two spaces.
ID
XX
AC
XX
DE
DE
DE
RX
RX
XX
FT
FT
FT
FT
FT
FT
SQ
//
AA03518 standard; DNA; FUN; 237 BP. XX AC U03518;
U03518;
Aspergillus awamori internal transcribed spacer 1 (ITS1) and 18S
rRNA and 5.8S rRNA genes, partial sequence.
rRNA and 5.8S rRNA genes, partial sequence.
MEDLINE; 94303342.
PUBMED; 8030378.
rRNA
<1..20
/product="18S ribosomal RNA"
misc_RNA 21..205
/standard_name="Internal transcribed spacer 1 (ITS1)"
rRNA
206..>237
/product="5.8S ribosomal RNA"
Sequence 237 BP; 41 A; 77 C; 67 G; 52 T; 0 other;
aacctgcgga aggatcatta ccgagtgcgg gtcctttggg cccaacctcc catccgtgtc 60
tattgtaccc tgttgcttcg gcgggcccgc cgcttgtcgg ccgccggggg ggcgcctctg 120
ccccccgggc ccgtgcccgc cggagacccc aacacgaaca ctgtctgaaa gcgtgcagtc 180
tgagttgatt
gaatgcaatc
agttaaaact
ttcaacaatg gatctcttgg ttccggc
237
5/23/2017
10:32:54
AM
FASTA
•A sequence in Fasta format begins with a single-line description,
•followed by lines of sequence data.
•The description line is distinguished from the sequence data by a greaterthan (">") symbol in the first column.
•It is recommended that all lines of text be shorter than 80 characters in
length.
>U03518 Aspergillus awamori internal transcribed spacer 1 (ITS1)
AACCTGCGGAAGGATCATTACCGAGTGCGGGTCCTTTGGGCCCAACCTCCCATCCGTGTCTATTGTACCC
TGTTGCTTCGGCGGGCCCGCCGCTTGTCGGCCGCCGGGGGGGCGCCTCTGCCCCCCGGGCCCGTGCCCGC
CGGAGACCCCAACACGAACACTGTCTGAAAGCGTGCAGTCTGAGTTGATTGAATGCAATCAGTTAAAACT
TTCAACAATGGATCTCTTGGTTCCGGC
5/23/2017 10:32:54 AM
GCG
•Exactly one sequence
•Begins with annotation lines
•Start of the sequence is marked by a line ending with "..“
•This line also contains the sequence identifier, the sequence length
and a checksum
ID
XX
AC
XX
DE
DE
XX
AA03518 standard; DNA; FUN; 237 BP.
U03518;
Aspergillus awamori internal transcribed spacer 1 (ITS1) and 18S
rRNA and 5.8S rRNA genes, partial sequence.
SQ Sequence 237 BP; 41 A; 77 C; 67 G; 52 T; 0 other; AA03518 Length: 237 Check: 4514
..
1
61
121
181
aacctgcgga
tattgtaccc
ccccccgggc
tgagttgatt
aggatcatta
tgttgcttcg
ccgtgcccgc
gaatgcaatc
5/23/2017 10:32:54 AM
ccgagtgcgg
gcgggcccgc
cggagacccc
agttaaaact
gtcctttggg
cgcttgtcgg
aacacgaaca
ttcaacaatg
cccaacctcc
ccgccggggg
ctgtctgaaa
gatctcttgg
catccgtgtc
ggcgcctctg
gcgtgcagtc
ttccggc
GenBank/GenPept
The nucleotide (GenBank) and protein (Gen Pept) database entries
are available from Entrez in this format
•Can contain several sequences
•One sequence starts with: “LOCUS”
•The sequence starts with: "ORIGIN“
•The sequence ends with: "//“
LOCUS
AAU03518 237 bp DNA PLN 04-FEB-1995
DEFINITION Aspergillus awamori internal transcribed spacer
18S
rRNA and 5.8S rRNA genes, partial sequence.
ACCESSION U03518
BASE COUNT 41 a 77 c 67 g 52 t
ORIGIN
1 aacctgcgga aggatcatta ccgagtgcgg gtcctttggg cccaacctcc
61 tattgtaccc tgttgcttcg gcgggcccgc cgcttgtcgg ccgccggggg
121 ccccccgggc ccgtgcccgc cggagacccc aacacgaaca ctgtctgaaa
181 tgagttgatt gaatgcaatc agttaaaact ttcaacaatg gatctcttgg
//
5/23/2017 10:32:54 AM
1 (ITS1) and
catccgtgtc
ggcgcctctg
gcgtgcagtc
ttccggc
NBRF (protein or nucleic acid) File
Format
The first line of each sequence entry begins with a greater than symbol, >. This is
immediately followed by the two character sequence type specifier. Space four must
contain a semi-colon. Beginning in space five is the sequence name or identification
code for the NBRF database. The code is from four to six letters and numbers.
Specifier
P1
F1
DL
DC
RL
RC
N1
N3
Sequence type
protein, complete
protein, fragment
DNA, linear
DNA, circular
RNA, linear
RNA, circular
functional RNA, other than tRNA
tRNA
The second line of each sequence entry contains two kinds of information. First is the
sequence name which is separated from the organism or organelle name by the three
character sequence blank space, dash, blank space, " - ". There is no special character
marking the beginning of this line.
Either the amino acid or nucleic acid sequence begins on line three and can begin in
any space, including the first. The sequence is free format and may be interrupted by
blanks for ease of reading. Protein sequences man contain special punctuation to
indicate various indeterminacies in the sequence. In the NBRF data files all lines may
be up to 500 characters long. However some PSC programs currently have a limit of
130 characters per line (including blanks), and BitNet will not accept lines of over eighty
characters.
The last character in the sequence must be an asterisks, *.
5/23/2017 10:32:54 AM
ReadSeq
Don Gilbert
[email protected], May 2001
Bioinformatics group, Biology Department & Cntr. Genomics
& Bioinformatics,
Indiana University, Bloomington, Indiana
WWW
http://bioportal.bic.nus.edu.sg/readseq/readseq.html
http://www-bimas.cit.nih.gov/molbio/readseq/
http://bioweb.pasteur.fr/seqanal/interfaces/readseq-simple.html
Seqret
A program in EMBOSS suite
5/23/2017 10:32:54 AM
The Readseq package can read most common formats: examples of all these
formats are included in the readseq directory. The formats include:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
IG/Stanford, used by Intelligenetics and others
GenBank/GB, genbank flatfile format
NBRF format (SAM modifications cause this to break when sequences do not have a
terminating asterix)
EMBL, EMBL flatfile format
GCG, single sequence format of GCG software
DNAStrider, for common Mac program
Fitch format, limited use
Pearson/Fasta, a common format used by Fasta programs and others
Zuker format, limited use. Input only.
Olsen, format printed by Olsen VMS sequence editor. Input only.
Phylip3.2, sequential format for Phylip programs
Plain/Raw, sequence data only (no name, document, numbering)
MSF multi sequence format used by GCG software
PAUP's multiple sequence (NEXUS) format
PIR/CODATA format used by PIR
5/23/2017 10:32:54 AM
Installation and running Readseq
download from software directory from course homepage
mkdir readseq
cd readseq
tar xvf readseq.tar
./readseq --help
./readseq <INPUT1> <INPUT2> -format=genbank -output = output.gb
Exercises:
Go to NCBI site and download a fasta formatted file (via Entrez:
Nucleotide)
Convert the file into EMBL, Phylip, MSF, etc. formats
Download more files: can you work on multiple files ?
5/23/2017 10:32:54 AM