joseph wrote: > I got an error: >> names(sr) <- id(fq) > Error in `names<-`(`*tmp*`, value = <S4 object of class "BStringSet">) : > 'value' must be NULL or a character vector
What is your sessionInfo()? Mine is > sessionInfo() R version 2.9.1 Patched (2009-07-31 r49053) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ShortRead_1.3.11 lattice_0.17-25 BSgenome_1.13.6 Biostrings_2.13.15 [5] IRanges_1.3.25 loaded via a namespace (and not attached): [1] Biobase_2.4.1 grid_2.9.1 hwriter_1.1 as an alternative names(sr) <- as.character(id(fq)) Martin > > > ------------------------------------------------------------------------ > *From:* Martin Morgan <[email protected]> > *To:* joseph <[email protected]> > *Cc:* [email protected] > *Sent:* Monday, August 3, 2009 7:06:56 PM > *Subject:* Re: [Bioc-sig-seq] fastq2fasta > > Hi Joseph -- > > One way, for some file 'fin' to file 'fout' > > fq <- readFastq(fin) > sr <- sread(fq) > names(sr) <- id(fq) > write.XStringSet(sr, fout, format="fasta") > > Martin > > joseph wrote: >> Hello >> Can you show me how to use ShortRead to convert a fastq file like > this one >> @7:1:1 >> NNNNNNN >> + >> %%%%%% >> @7:1:2 >> NNNNNNN >> + >> %%%%%% >> >> to a fasta file keeping only the id and the read: >> >>> @7:1:1 >> NNNNNNNN >>> @7:1:2 >> NNNNNNNN >> >> Thanks in advance >> Joseph >> >> >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioc-sig-sequencing mailing list >> [email protected] > <mailto:[email protected]> >> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing > > _______________________________________________ Bioc-sig-sequencing mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
