利用bedtools提取基因組指定區(qū)域序列

利用bedtools能夠快速批量的提取基因組上指定區(qū)域的序列。

1. Example:

bedtools getfasta -fi example_genome.fasta -bed example.bed -fo example.fa -name
文件 說明
example_genome.fasta 基因組序列;
example.bed 指定位置,bed文件前四列分別為染色體、起始位置、結束位置及命名,列之間以制表符分隔(\t),需要提取多個位置,按行分隔;
example.fa 截取序列的輸出文件。

在提取指定位點的前后各100bp時,如指定位點為Chr1 12345,bed文件中可以位置應該為Chr1 12345-101 12345+100。

2. 安裝

bedtools軟件的安裝,建議在有網(wǎng)絡的情況下利用conda安裝,方便快捷,安裝命令:

conda install -c bioconda bedtools

Ubuntu系統(tǒng)也可以利用apt進行安裝:

sudo apt-get install bedtools

3. 說明書

Tool:    bedtools getfasta (aka fastaFromBed)
Version: v2.27.1
Summary: Extract DNA sequences from a fasta file based on feature coordinates.

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

Options:
        -fi     Input FASTA file
        -fo     Output file (opt., default is STDOUT
        -bed    BED/GFF/VCF file of ranges to extract from -fi
        -name   Use the name field for the FASTA header
        -name+  Use the name field and coordinates for the FASTA header
        -split  given BED12 fmt., extract and concatenate the sequences
                from 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.
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容