#!/usr/bin/perl -w use strict; die "Usage: $0 <file>\n" unless (@ARGV == 1); my $lines = 0; my $bases = 0; while (my $line = <>){ # <> operator reads one line at a time from the file specified by $ARGV[0]. chomp $line; next if
常规方法 #! usr/bin/perl -w use strict; my $input=shift; my %hash; open IN,"<$input"; $/=">"; while(<IN>){ chomp; $hash{$_}=1; } foreach my $key(keys %hash){ print ">$key"; } close IN; Bioseq模块方法 #!/usr/bin/perl us
使用JSON 模块中的 decode_json 函数,将json文件中的数据解码为perl 中的对象,然后进行处理 代码如下: #!/usr/bin/env perl use JSON; use Encode; my ($json) = @ARGV; my $context; open TXT, $json or die "Can't open $json!\n"; while (<TXT>) { $context .= $_; } close TXT; my $obj =
http://search.cpan.org/~shlomif/Statistics-Descriptive-3.0612/lib/Statistics/Descriptive.pm use Statistics::Descriptive;my @a=(100,88,77,18,79,96,57,88,65,78,66,99); my $stat = Statistics::Descriptive::Full->new();$stat->add_data(@a); my $mean = $st
准备读四篇denovo的文献: Nature Biotechnology(2015) - Sequencing of allotetraploid cotton (Gossypium hirsutum L. acc. TM-1) provides a resource for fiber improvement Whole-genome sequencing of the snub-nosed monkey provides insights into folivory and evolutio