USSC上的文件格式匯總
1.BED?
某些翻譯軟件可能翻譯為床文件,其實(shí)是叫Browser Extensible Data啡彬,直譯就是瀏覽器拓展數(shù)據(jù)胖缤。
三個必須的列:The first three required BED fields are:
chrom?- The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671).
chromStart?- The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.
chromEnd?- The ending position of the feature in the chromosome or scaffold. The?chromEnd?base is not included in the display of the feature, however, the number in?position format?will be represented. For example, the first 100 bases of chromosome 1 are defined as?chrom=1, chromStart=0, chromEnd=100, and span the bases numbered 0-99 in our software (not 0-100), but will represent the position notation chr1:1-100. Read more?here.
關(guān)于染色體的起始位置和終止位置的坐標(biāo)計(jì)數(shù),The UCSC Genome Browser Coordinate Counting Systems有更多的解釋淤刃。畫的圖很容易懂摸恍,用手指就可以領(lǐng)會砸逊。
If you submit data to the browser in position format (chr#:##-##), the browser assumes this information is 1-based. If you submit data in any other format (BED (chr# ## ##) or otherwise), the browser will assume it is 0-based.??Similarly, any data returned by the browser in position format is 1-based, while data returned in BED format is 0-based.至于為什么要有這兩種文件格式璧南,留坑,我也不知道师逸。
The 9 additional optional BED fields are:
name?- Defines the name of the BED line. This label is displayed to the left of the BED line in the Genome Browser window when the track is open to full display mode or directly to the left of the item in pack mode.
score?- A score between 0 and 1000. If the track line?useScore?attribute is set to 1 for this annotation data set, the?score?value will determine the level of gray in which this feature is displayed (higher numbers = darker gray).
strand?- Defines the strand. Either "." (=no strand) or "+" or "-".
thickStart?- The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position.
thickEnd?- The ending position at which the feature is drawn thickly (for example the stop codon in gene displays).
itemRgb?- An RGB value of the form R,G,B (e.g. 255,0,0). If the track line?itemRgb?attribute is set to "On", this RBG value will determine the display color of the data contained in this BED line. NOTE: It is recommended that a simple color scheme (eight colors or less) be used with this attribute to avoid overwhelming the color resources of the Genome Browser and your Internet browser.
blockCount?- The number of blocks (exons) in the BED line.
blockSizes?- A comma-separated list of the block sizes. The number of items in this list should correspond to?blockCount.
blockStarts?- A comma-separated list of block starts. All of the?blockStart?positions should be calculated relative to?chromStart. The number of items in this list should correspond to?blockCount.
參考BED文件格式
name- BED行名司倚,在基因組瀏覽器左邊顯示;
score- 在基因組瀏覽器中顯示的灰度設(shè)定篓像,值介于0-1000动知;
strand- 正負(fù)鏈標(biāo)記. Either "." (=no strand) or "+" or "-".
thickStart- feature起始位置(for example, the start codon in gene displays)。 When there is no thick part, thickStart and thickEnd are usually set to the chromStart position.
thickEnd-? feature編碼終止位置 (for example the stop codon in gene displays).
itemRgb- R,G,B (e.g. 255,0,0)值员辩,當(dāng)itemRgb設(shè)置為 "On"盒粮,BED的行會顯示顏色.
blockCount- blocks (exons外顯子)數(shù)目.
blockSizes- blocks (exons)大小列表,逗號分隔奠滑,對應(yīng)于blockCount.
blockStarts-blocks (exons)起始位置列表丹皱,逗號分隔,對應(yīng)于blockCount.宋税;這個起始位置是與chromStart的一個相對位置摊崭。
如果看到bed后面有數(shù)字,比如說BED3或者BED4杰赛,數(shù)字代表的可能是列數(shù)呢簸。
2.BED detail format
包含BED格式文件的4-12列,此外還有ID和a description of the item乏屯。
track name=HbVar type=bedDetail description="HbVar custom track" db=hg19 visibility=3 url="http://globin.bx.psu.edu/cgi-bin/hbvar/query_vars3?display_format=page&mode=output&id=$$"chr11 5246919 5246920 Hb_North_York 2619 Hemoglobin variantchr11 5255660 5255661 HBD c.1 G>A 2659 delta0 thalassemiachr11 5247945 5247946 Hb Sheffield 2672 Hemoglobin variantchr11 5255415 5255416 Hb A2-Lyon 2676 Hemoglobin variantchr11 5248234 5248235 Hb Aix-les-Bains 2677 Hemoglobin variant
粗體字必須包含在track-line里面阔墩。
3.BedGraph Track Format
track line attribute=value pairs
track lines define the display attributes for all lines in an annotation data set.
track line定義了注釋文件集的展示屬性。
name=<track_label>瓶珊、description=<center_label>、type=<track_type>?耸彪、color=<RRR,GGG,BBB>等等
包含了四列BED文件的內(nèi)容
Following the track definition line are the track data in four column BED format:
The chromosome coordinates are?zero-based, half-open.
4.FASTA和FASTQ?
1伞芹、FASTA文件的格式
在生物信息學(xué)中,F(xiàn)ASTA格式(又稱為Pearson格式)是一種基于文本的、用于表示核苷酸序列或氨基酸序列的格式唱较。在這種格式中堿基對或氨基酸用單個字母來表示扎唾,且允許在序列前添加序列名及注釋。
FASTA文件以序列表示和序列作為一個基本單元南缓,各行記錄信息如下:
第一行是由大于號">"開頭的任意文字說明胸遇,用于序列標(biāo)記,為了保證后續(xù)分析軟件能夠區(qū)分每條序列汉形,單個序列的標(biāo)識必須具有唯一性纸镊。;
從第二行開始為序列本身概疆,只允許使用既定的核苷酸或氨基酸編碼符號逗威。通常核苷酸符號大小寫均可,而氨基酸常用大寫字母岔冀。使用時應(yīng)注意有些程序?qū)Υ笮懹忻鞔_要求凯旭。文件每行的字母一般不應(yīng)超過80個字符。
2使套、FASTQ文件格式
FASTQ是基于文本的罐呼、保存核酸序列和其測序質(zhì)量信息的標(biāo)準(zhǔn)格式。其序列以及質(zhì)量信息都是使用一個ASCII字符標(biāo)示侦高,最初由Sanger開發(fā)嫉柴,目的是將FASTA序列與質(zhì)量數(shù)據(jù)放到一起,目前已經(jīng)成為高通量測序結(jié)果的事實(shí)標(biāo)準(zhǔn)矫膨。
FASTQ文件中以四行最為一個基本單元差凹,并對應(yīng)一條序列的測序信息,各行記錄信息如下:
第一行記錄序列標(biāo)識以及相關(guān)的描述信息侧馅,以‘@’開頭危尿,為了保證后續(xù)分析軟件能夠區(qū)分每條序列,單個序列的標(biāo)識必須具有唯一性馁痴;
第二行為堿基序列谊娇;
第三行以‘+’開頭,后面是序列標(biāo)示符罗晕、描述信息济欢,或者什么也不加;
第四行小渊,是質(zhì)量信息法褥,長度和第二行的序列相對應(yīng),每一個序列都有一個質(zhì)量評分酬屉,根據(jù)評分體系的不同半等,每個字符的含義表示的數(shù)字也不相同揍愁。
5.BAM/SAM
BAM is the compressed binary version of the?Sequence Alignment/Map (SAM)?format, a compact and index-able representation of nucleotide sequence alignments. Many?next-generation sequencing and analysis tools?work with SAM/BAM.?
SAM (Sequence Alignment/Map) format is a generic format for storing large nucleotide sequence alignments.
超鏈接可以查看以sam作為input或者output的軟件。
處理大文件都需要一個索引杀饵,索引的作用是可以快速定位到文件的任意位置莽囤,因此,建立索引切距,也是bam文件的重要功能朽缎,而建立索引,必須是排序后的bam文件谜悟。所以话肖,拿到一個比對好的sam之后,基本處理就是排序赌躺,格式轉(zhuǎn)換狼牺,建立索引。
在bismark中有一個對基因組建立索引的步驟礼患,但是我也不知道為什么要建立這個索引以及這個索引可以用來干什么是钥。可能是為了提高比對的速度缅叠。留坑悄泥。
#這里的bt2結(jié)尾的文件就是索引,是二進(jìn)制文件肤粱。
(1)Convert SAM to BAM using the samtools program:#將SAM文件轉(zhuǎn)換為BAM文件弹囚。
? ? samtools view -S -b -o my.bam my.sam
If converting a SAM file that does not have a proper header, the -t or -T option is necessary. For more information about the command, run samtools view with no other arguments.
(2)Sort and create an index for the BAM:排序并且建立索引
? ? samtools sort my.bam my.sorted
? ? samtools index my.sorted.bam
The sort command appends .bam to my.sorted, creating a BAM file of alignments ordered by leftmost position on the reference assembly.
The index command generates a new file, my.sorted.bam.bai, with which genomic coordinates can quickly be translated into file offsets in my.sorted.bam.有了這個.BAI為后綴的文件基因組坐標(biāo)可以快速在BAM文件中轉(zhuǎn)換為文件偏移量。(看不太懂)