Merging separate sequence and quality files to FASTQ

#!/usr/bin/perl -w use strict; use Bio::SeqIO; use Bio::Seq::Quality; use Getopt::Long; die “pass a fasta and a fasta-quality file\n” unless @ARGV; my ($seq_infile,$qual_infile) = (scalar @ARGV == 1) ?($ARGV[0], “$ARGV[0].qual”) : @ARGV; ## Create input objects for both a seq (fasta) and qual file my $in_seq_obj = Bio::SeqIO->new( -file => $seq_infile, -format => ‘fasta’, ); my […]

Converting FASTQ to FASTA QUAL files

#!/usr/bin/env perl # Convert a fastq to a fasta/qual combo using BioPerl, with some Linux commands use Bio::Perl; use Data::Dumper; use strict; use warnings; use threads; use Thread::Queue; use Getopt::Long; my $settings={}; $|=1; my %numSequences; # static for a subroutine exit(main()); sub main{ die(“Usage: $0 -i inputFastqFile [-n numCpus -q outputQualfile -f outputFastaFile]”) if(@ARGV<1); GetOptions($settings,(‘numCpus=s’,’input=s’,’qualOut=s’,’fastaOut=s’)); […]

使用CPAN模块自动安装perl模块

命令: perl -MCPAN -e shell

初次运行CPAN时需要做一些设置,一路回车在最后选一个最近的CPAN镜像站点。例如国内的中国自由软件库: ftp://freesoft.cgi.gov.cn/pub/languages/perl/CPAN

获得帮助 cpan>h

列出CPAN上所有模块的列表 cpan>m

安装模块

perl -MCPAN -e shell cpan> install IO::Wrap cpan> install Net::Server cpan> install MIME::Words

也可以合并成一条命令,如: perl -MCPAN -e ‘install Net::Server’

退出 cpan>q 如果自动安装失败,可以手动安装跳过测试: cd /root/.cpan/build/Net-Server-0.97/ perl Makefile.PL make install