[BioRuby] mask on Ilumina-format

Raoul Bonnal bonnal at ingm.org
Tue Mar 29 03:51:26 EDT 2011


>From a Goto-san's mail:
 q = Bio::Fastq.new("@test\natgcgataatgc\n+test\nCCCCDDDDBXXX\n")
 q.format = :fastq_illumina
 puts q.mask(your_quality_threshold, your_masking_char)
keep in mind mask masks the bases < your_quality_threshold

by default the format is :fastq_sanger if you call q.quality_scores ( without specify q.format)
On 29/mar/2011, at 01.45, 遠藤大二 wrote:

> Dear All
> I start to use illumina-formated data.
> 
> On the start, data was parsed as below.
> 
> Data*****
> @ILLUMINA-554790:34:6:107:18082:1570#0/1
> AATCGTTGTAGATTCATTACTGCTCCTGAGCGGTTTACAGGAGTAAGTGTAGACGTTGAGAAATGATATTTGTGAA
> +ILLUMINA-554790:34:6:107:18082:1570#0/1
> efgggfffffffffffggaggggggggg[ggg[gggggagfdfafffaff_aadc^dfYaffcffKaca_^aXcBB
> @ILLUMINA-554790:34:6:107:18268:1571#0/1
> AGCAAGCAATCGCCAGCAGCAGAGTGCCAAGACGCCCCAGCGCAAACCACAGTCTGCCCGCTTTGCTGTTGCTGGT
> +ILLUMINA-554790:34:6:107:18268:1571#0/1
> cccSc]\LYSaYYbKcc[ccccccacY_c^aRaZSca\\OYaaaaJR`X\]]FHX^aQaHR\PWSaaccaaaILca
> @ILLUMINA-554790:34:6:107:18774:1566#0/1
> CCAGGCAAAGAGATCGCGCATAGCGGTAAATTTATTCGACAACAGCAGCCAGATAGCAAAATCACGCAGCAGCCAG
> +ILLUMINA-554790:34:6:107:18774:1566#0/1
> hhhhhhhhhhhghggghfhhhehhhhffhfhhhhhhhdahghchfaggafhcah[ffhefhcehffahhaffdh_a
> 
> Parsing script*****
> 
> require 'bio'
> quality_threshold = 60
> Bio::FlatFile.open('text.txt').each do |entry|
>       p entry.format
>       p entry.entry_id
>       p entry.seq
>       hq_seq = entry.mask(quality_threshold, mask_char='n')
> end
> 
> *******************
> 
> But,
> p entry.format   returns nil
> and
> entry.mask    returns    undefined method `mask' for
> #<Bio::Fastq:0x7f1eb5d9dc28> (NoMethodError)
> 
> How I set format to FASTQ_ILLUMINA and use 'mask' method.
> 'http://bioruby.open-bio.org/rdoc/'  is so difficult for me and need
> help to use it.
> 
> With best wishes,
> Daiji Endoh
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby

--
Ra

linkedin: http://it.linkedin.com/in/raoulbonnal
twitter: http://twitter.com/ilpuccio
skype: ilpuccio
irc.freenode.net: Helius
github: https://github.com/helios









More information about the BioRuby mailing list