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);

  • 发表于 2018-06-22 15:44
  • 阅读 ( 3771 )
  • 分类:perl

0 条评论

请先 登录 后评论
安生水
安生水

349 篇文章

作家榜 »

  1. omicsgene 701 文章
  2. 安生水 349 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. xun 82 文章
  6. 红橙子 78 文章
  7. rzx 76 文章
  8. CORNERSTONE 72 文章