This is the sidebar. Without it, the main text is too wide!
- Genome project
- Linux
2019년 11월 교육 자료
- 실습용 스크립트 구글 문서라서 접속 환경에 따라 열리지 않을 수도 있습니다.
This is the sidebar. Without it, the main text is too wide!
2019년 11월 교육 자료
#!/usr/bin/perl $sum = $pos = 0; while (<>) { chomp; my @data = split /\t/, $_; if (!exists $seen{$data[0]} && $pos > 0) { print $data[0], "\t", $sum / $pos, "\n"; $sum = $pos = 0; } elsif (exists $seen{$data[0]}) { $sum += $data[2]; $pos++; } elsif (!exists $seen{$data[0]}) { print STDERR "Processing $data[0]...\n"; $seen{$data[0]} = ''; } } print "\t", $sum / $pos, "\n";