From: jonathan <bio...@gm...> - 2013-07-10 06:30:23
|
Le dimanche 07 juillet 2013 à 23:24 +0100, Peter Cock a écrit : > On Sun, Jul 7, 2013 at 10:49 PM, jonathan <bio...@gm...> wrote: > > Dear, > > I would like to know if we can add a comment line at the end of this > > file like: > > # sequences : 17809 > > > > This can help by example if i want to take 5% random sequences. Is not > > reed need to read all file just seek to end and read last line > > > > Or you can pre-allocate an array of 17809 sequences before to start to > > read the fasta file > > No, that would not be a valid SAM file. You could add something > at the START of the file in the @ line headers perhaps... > > If you are using an indexed BAM file, the BAM index can tell > you the read count. > > Peter Thanks for your answer, I am not sure if we speak about same file. I talk about .fai file which is generated by : samtools faidx ref.fasta |