这个 脚本已经不用了,你再看看新课程吧: https://bdtcd.xetslk.com/s/1BAqPp
### mcscan.filter.pluse Getopt::Long;use strict;use Bio::SeqIO;use Bio::Seq;use File::Basename qw(basename dirname);use Cwd qw(abs_path);#get optsmy %opts;GetOptions(\%opts, "in=s", "out=s","id1=s","id2=s","h");if(!defined($opts{id2}) || !defined($opts{id1}) || !defined($opts{in}) || !defined($opts{out}) || defined($opts{h})){ print <<" Usage End.";
Usage Forced parameter: -gff genoma gff file <infile> must be given -fa genoma fasta file <infile> must be given -o output gff file <outfile> must be given -out output fasta file <outfile> must be given Other parameter: -h Help document Usage End. exit;}open(IN,"$opts{id1}") || die "open $opts{id1} failed\n";my %gene1;while(<IN>){ next if(/^#/); chomp; my @line = split ("\t"); $gene1{$line[0]} = $line[0];}close(IN);open(IN,"$opts{id2}") || die "open $opts{id2} failed\n";my %gene2;while(<IN>){ next if(/^#/); chomp; my @line = split ("\t"); $gene2{$line[0]} = $line[0];}close(IN);open(IN,"$opts{in}") || die "open $opts{in} failed\n";open(OUT,">$opts{out}") || die "open $opts{out} failed\n";while(<IN>){ next if(/^#/); chomp; my @line = split ("\t"); if(exists $gene1{$line[0]} && exists $gene2{$line[1]}){ print OUT "#DC143C*$line[0]\t$line[0]\t$line[1]\t$line[1]\t100\t+\n"; }}close(IN);close(OUT);
这个 脚本已经不用了,你再看看新课程吧: https://bdtcd.xetslk.com/s/1BAqPp
如果觉得我的回答对您有用,请随意打赏。你的支持将鼓励我继续创作!