Motif counts
作者:
余绕 | 来源:发表于
2022-04-15 16:10 被阅读0次
- Extract sequence from Gemomic sequences basing on GFF3 file.
Here, we use promoter sequences (2kb upstream of the gene) as an example.
image.png
- 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;
}
}
- Run the script and get the output files.
本文标题:Motif counts
本文链接:https://www.haomeiwen.com/subject/dfkqertx.html
网友评论