您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關perl中SNP2CAPS怎么用,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
SNP2CAPS可將SNP轉換為CAPS標記,其具體用法: perl SNP2CAPS.pl chr5D:9950377.fa_1 link_gcg AanI,AarI,AasI,AatII,Aba6411II,AbaB8342IV,AbaCIII > chr5D:9950377.txt 其中...
SNP2CAPS可將SNP轉換為CAPS標記,其具體用法:
perl SNP2CAPS.pl chr5D:9950377.fa_1 link_gcg AanI,AarI,AasI,AatII,Aba6411II,AbaB8342IV,AbaCIII > chr5D:9950377.txt
其中chr5D:9950377.fa_1為SNP兩端各150bp的序列;link_gcg限制性內切酶數據庫;之后為分析用到的限制性內切酶列表 ;chr5D:9950377.txt為輸出文件
chr5D:9950377.fa_1示例: >chr5D:9950377_Ref ACAACTTTATCTCGTATTTCATAGCAGTAGCCAACCAATCTTATGATATTTTGATGTTGGGCCCTCATAAGATTCAGAAGCTCATTCTTAAAACCAGCTTCGACTAGTCCGGGCTGGTTGTACAGTTTCTTCACGGCAATCACTTCCCCGTTATCAAGTACTCCCTGTTCAAAATCCCATGTTTAAAAGTAATAATGCAAGGGTTCAGGTAGCTAGTGTAGTGGTGGCATCTGTTTAAAAGTATTATTTTTTTCGTAAAATGCGCTTAATTTTCCTCCCAGCAACCTTTCCACCAACTGAT >chr5D:9950377_Alt ACAACTTTATCTCGTATTTCATAGCAGTAGCCAACCAATCTTATGATATTTTGATGTTGGGCCCTCATAAGATTCAGAAGCTCATTCTTAAAACCAGCTTCGACTAGTCCGGGCTGGTTGTACAGTTTCTTCACGGCAATCACTTCCCCGCTATCAAGTACTCCCTGTTCAAAATCCCATGTTTAAAAGTAATAATGCAAGGGTTCAGGTAGCTAGTGTAGTGGTGGCATCTGTTTAAAAGTATTATTTTTTTCGTAAAATGCGCTTAATTTTCCTCCCAGCAACCTTTCCACCAACTGAT
link_gcg文件如果找不到,可在這下載:
鏈接:https://pan.baidu.com/s/1eJGIOs2O8cULYbAbc83JCA 密碼:ru01
輸出文件chr5D:9950377.txt示例:#Marker Enzyme Total size Restriction Sites Expected Fragments Members Predicted CAPS candidates ------------------------- chr5D:9950377 AbaCIII 301 153 153,148 Alt chr5D:9950377 AbaCIII 301 301 Ref chr5D:9950377 AciI 301 148 153,148 Alt chr5D:9950377 AciI 301 301 Ref chr5D:9950377 BscGI 301 301 Alt chr5D:9950377 BscGI 301 148 153,148 Ref chr5D:9950377 BspACI 301 148 153,148 Alt chr5D:9950377 BspACI 301 301 Ref chr5D:9950377 FauI 301 155 155,146 Alt chr5D:9950377 FauI 301 301 Ref chr5D:9950377 LlaG50I 301 133 168,133 Alt chr5D:9950377 LlaG50I 301 133,150 151,133,17 Ref chr5D:9950377 SsiI 301 148 153,148 Alt chr5D:9950377 SsiI 301 301 Ref Following markers could not be converted into CAPS --------------------------------------------------
如果輸出文件很多,這里有腳本可以批量提取酶信息,腳本如下。
#!/usr/bin/perl -w use strict; use warnings; use Getopt::Long; use Config::General; use Cwd qw(abs_path getcwd); use FindBin qw($Bin $Script); use File::Basename qw(basename dirname); use Bio::SeqIO; use Bio::Seq; my $version = "1.3"; ## prepare parameters ####################################################################### ## ------------------------------------------------------------------------------------------- ## GetOptions my %opts; GetOptions(\%opts, "id=s", "od=s", "h"); my $od = $opts{od}; $od = abs_path($od); my $id = $opts{id}; $id = abs_path($id); open(OUT,">$od/caps_out.txt") || die "open $od/caps_out.txt failed\n"; my @sample = glob ("$id/*.txt"); foreach my $i (@sample){ my $basename = basename ($i); open(IN,"$i") || die "open $i failed\n"; while(<IN>){ next if(/^S2C#Format:/); next if(/^#/); next if(/^Predicted CAPS candidates/); next if(/^-/); next if(/^Following markers could not be converted into CAPS/); next if(/^$/); next if(!/\t/); print OUT $_; } close(IN); } close(OUT);
關于“perl中SNP2CAPS怎么用”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。