初学perl,有何不妥,请指出。
#! /usr/bin/perl -w
use Bio::SeqIO;
use Bio::Seq;
$catchseq_seqio_obj = Bio::SeqIO->new(-file=>"filename.fasta", -format=>"largefasta");
$n=1;
while($seq_obj = $catchseq_seqio_obj->next_seq)
{
$seqio_obj = Bio::SeqIO->new(-file =>">filename_seq_$n.fasta", -format =>"largefasta");
$seqio_obj->write_seq($seq_obj);
$n++;
}
主要就是里面的-format=>"largefasta"的使用了。它可以在你的/tmp里面建立一个缓存来解决大文件打开时内存不足的问题。输出时用 -format =>"fasta"也行哈,看情况了。
本文由 Bin 创作
The proof changing -format to.Fasta instead of largefasta in .Bio SeqIO-new -file fileIn -format Fasta .solved my problem as was suggested this is probably not the right method.to use but it works ....Hilmar Lapp wrote .
The proof changing -format to.Fasta instead of largefasta in .Bio SeqIO-new -file fileIn -format Fasta .solved my problem as was suggested this is probably not the right method.to use but it works ....Hilmar Lapp wrote .
@bank account offshore, That's a good news.
The proof changing -format to.Fasta instead of largefasta in .Bio SeqIO-new -file fileIn -format Fasta .solved my problem as was suggested this is probably not the right method.to use but it works ....Hilmar Lapp wrote .
@Monex O(∩_∩)O~~~