这篇文章将为大家详细讲解有关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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。