这篇文章将为大家详细讲解有关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标记,其具体用法:

perlSNP2CAPS.plchr5D:9950377.fa_1link_gcgAanI,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_RefACAACTTTATCTCGTATTTCATAGCAGTAGCCAACCAATCTTATGATATTTTGATGTTGGGCCCTCATAAGATTCAGAAGCTCATTCTTAAAACCAGCTTCGACTAGTCCGGGCTGGTTGTACAGTTTCTTCACGGCAATCACTTCCCCGTTATCAAGTACTCCCTGTTCAAAATCCCATGTTTAAAAGTAATAATGCAAGGGTTCAGGTAGCTAGTGTAGTGGTGGCATCTGTTTAAAAGTATTATTTTTTTCGTAAAATGCGCTTAATTTTCCTCCCAGCAACCTTTCCACCAACTGAT>chr5D:9950377_AltACAACTTTATCTCGTATTTCATAGCAGTAGCCAACCAATCTTATGATATTTTGATGTTGGGCCCTCATAAGATTCAGAAGCTCATTCTTAAAACCAGCTTCGACTAGTCCGGGCTGGTTGTACAGTTTCTTCACGGCAATCACTTCCCCGCTATCAAGTACTCCCTGTTCAAAATCCCATGTTTAAAAGTAATAATGCAAGGGTTCAGGTAGCTAGTGTAGTGGTGGCATCTGTTTAAAAGTATTATTTTTTTCGTAAAATGCGCTTAATTTTCCTCCCAGCAACCTTTCCACCAACTGAT

link_gcg文件如果找不到,可在这下载:

链接:https://pan.baidu.com/s/1eJGIOs2O8cULYbAbc83JCA 密码:ru01

输出文件chr5D:9950377.txt示例:#MarkerEnzymeTotalsizeRestrictionSitesExpectedFragmentsMembersPredictedCAPScandidates-------------------------chr5D:9950377AbaCIII301153153,148Altchr5D:9950377AbaCIII301301Refchr5D:9950377AciI301148153,148Altchr5D:9950377AciI301301Refchr5D:9950377BscGI301301Altchr5D:9950377BscGI301148153,148Refchr5D:9950377BspACI301148153,148Altchr5D:9950377BspACI301301Refchr5D:9950377FauI301155155,146Altchr5D:9950377FauI301301Refchr5D:9950377LlaG50I301133168,133Altchr5D:9950377LlaG50I301133,150151,133,17Refchr5D:9950377SsiI301148153,148Altchr5D:9950377SsiI301301RefFollowingmarkerscouldnotbeconvertedintoCAPS--------------------------------------------------

如果输出文件很多,这里有脚本可以批量提取酶信息,脚本如下。

#!/usr/bin/perl-wusestrict;usewarnings;useGetopt::Long;useConfig::General;useCwdqw(abs_pathgetcwd);useFindBinqw($Bin$Script);useFile::Basenameqw(basenamedirname);useBio::SeqIO;useBio::Seq;my$version="1.3";##prepareparameters#########################################################################-------------------------------------------------------------------------------------------##GetOptionsmy%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.txtfailed\n";my@sample=glob("$id/*.txt");foreachmy$i(@sample){my$basename=basename($i);open(IN,"$i")||die"open$ifailed\n";while(<IN>){nextif(/^S2C#Format:/);nextif(/^#/);nextif(/^PredictedCAPScandidates/);nextif(/^-/);nextif(/^FollowingmarkerscouldnotbeconvertedintoCAPS/);nextif(/^$/);nextif(!/\t/);printOUT$_;}close(IN);}close(OUT);

关于“perl中SNP2CAPS怎么用”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。