美文网首页
Motif counts

Motif counts

作者: 余绕 | 来源:发表于2022-04-15 16:10 被阅读0次
  1. Extract sequence from Gemomic sequences basing on GFF3 file.
    Here, we use promoter sequences (2kb upstream of the gene) as an example.
image.png
  1. Use the perl script to calculates the Motif found in promoter regions.
#!usr/bin/perl
open FA,"$ARGV[0]";

$/=">";
<FA>;
while(<FA>){
chomp;
my ($id,$seq)=split/\n/,$_,2;

$seq=~s/\n//g;
$seq=~s/\s//g;

if(($seq=~/CTTCT[TA]C/i) or ($seq=~/G[TA]AGAAG/i) ){
    

    my $COUNT =($seq=~s/CTTCT[TA]C/xxxxxxx/ig);  #正向链match的
    my $count =( $seq=~s/G[TA]AGAAG/xxxxxxx/ig); #反向互补链mathced的
    print "Gene ID:$id\t"."Positive strand\t"."$COUNT\ttimes\t"."Negative strand\t"."$count\ttimes\n";

}
else {
    
    next;
}


}

  1. Run the script and get the output files.

相关文章

网友评论

      本文标题:Motif counts

      本文链接:https://www.haomeiwen.com/subject/dfkqertx.html