加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

bioinformatics perl useful

发布时间:2020-12-16 00:31:09 所属栏目:大数据 来源:网络整理
导读:BLAST use Bio::SearchIO;my $searchio=Bio::SearchIO-new(-file=$file_blast,-format='blast');while( my $result = $searchio-next_result ) { my $qid = $result-query_name(); my $qlen= $result-query_length(); my $did = $result-database_name(); wh

BLAST

use Bio::SearchIO;
my $searchio=Bio::SearchIO->new(-file=>$file_blast,-format=>'blast');
while( my $result = $searchio->next_result ) {
  my $qid = $result->query_name();
  my $qlen= $result->query_length();
  my $did = $result->database_name();
  while( my $hit = $result->next_hit ) {
    my $hit_name = $hit->name();
    my $hit_len = $hit->length;
    while( my $hsp = $hit->next_hsp ) {
      my $qs=$hsp->start('query');
      my $qe=$hsp->end('query');
      my $ds=$hsp->start('subject');
      my $de=$hsp->end('subject');
    }#hsp
  }#hit
}#result



FASTA

use Bio::SeqIO;
my $in=Bio::SeqIO->new(-file=>$fa_add,-format=>'fasta');
while(my $s=$in->next_seq){
  my $id=$s->id;
  my $seq=$s->seq;
}



GFF3

my($seqid,$source,$type,$start,$end,$score,$strand,$phase,$attribute)=split /t/;


Pfam

my($seqid,$alignment_start,$alignment_end,$envelope_start,$envelope_end,$hmm_acc,$hmm_name,$hmm_start,$hmm_end,$hmm_length,$bit_score,$evalue,$significance,$clan)=split /s+/;


mumer

my %aln;

  open(F,'<',$file_nucmer) or die("$!: $file_nucmern");
  while (<F>) {
    next unless(m/^d+/);
    chomp;
    my($start1,$end1,$start2,$end2,$len1,$len2,$identity,$length_reference,$length_query,$coverage_reference,$coverage_query,$id_reference,$id_query)=split /t/;
    push(@{$aln{$id_reference}},[$start1,$id_query]);
  }
  close(F);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读