bedtools批量提取基因組指定位置序列

bedtools批量提取基因組指定位置序列

之前已經(jīng)介紹過(guò)很多提取序列的方法,有腳本的也有軟件的,這里再介紹一種方法。

用到軟件是bedtools,具體方法如下:

>Usage:   bedtools getfasta [OPTIONS] -fi <fasta> -bed <bed/gff/vcf>

Options:
-fi Input FASTA file
-bed BED/GFF/VCF file of ranges to extract from -fi
-name Use the name field for the FASTA header
-split given BED12 fmt., extract and concatenate the sequencesfrom the BED "blocks" (e.g., exons)
-tab Write output in TAB delimited format.
- Default is FASTA format.
-s Force strandedness. If the feature occupies the antisense,
strand, the sequence will be reverse complemented.
- By default, strand information is ignored.
-fullHeader Use full fasta header.
- By default, only the word before the first space or tab is used.
其中-fi 指定基因組fasta文件,-bed 指定要提取序列的位置文件,可以是bed、gff 或 vcf 文件(染色體堿基位置從0開(kāi)始計(jì)數(shù))。
-tab 指定輸出格式。

$bedtools getfasta -fi GCA_001651475.1_Ler_Assembly_genomic.fna -bed id.bed

>CM004359.1:0-10
gtttagggtt
>CM004359.1:100-200
ttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggttt
>CM004359.1:1000-1050
TTGTGGgaaaattatttagttgtaGGGATGAAGTCTTTCTTCGTTGTTGT

$bedtools getfasta -fi GCA_001651475.1_Ler_Assembly_genomic.fna -bed id.bed -tab

>CM004359.1:0-10 gtttagggtt
>CM004359.1:100-200 ttagggtttagg gtttagggtttagggtttagggttta gggtttagggtttagggtttagggtttagggtttagggtttagggtttagggtttagggttt
>CM004359.1:1000-1050 TTGTGGgaaaattatttagttgtaGGGATGAAGTCTTTCTTCGTTGTTGT

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容