how to read empty line in the fastqfile
2
0
Entering edit mode
wang peter ★ 2.0k
@wang-peter-4647
Last seen 10.1 years ago
i often meet this problem after trimming the adapters > reads <- readFastq(fastqfile); Error: Input/Output file(s): L003GAF-128.trimmed message: unexpected empty line L003GAF-128.trimmed:61 R version 2.14.1 (2011-12-22) Platform: x86_64-redhat-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] 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.12.4 latticeExtra_0.6-19 RColorBrewer_1.0-5 [4] Rsamtools_1.6.3 lattice_0.20-0 Biostrings_2.22.0 [7] GenomicRanges_1.6.7 IRanges_1.12.6 loaded via a namespace (and not attached): [1] Biobase_2.14.0 bitops_1.0-4.1 BSgenome_1.22.0 grid_2.14.1 [5] hwriter_1.3 RCurl_1.91-1 rtracklayer_1.14.4 tools_2.14.1 [9] XML_3.9-4 zlibbioc_1.0.0 -- shan gao Room 231(Dr.Fei lab) Boyce Thompson Institute Cornell University Tower Road, Ithaca, NY 14853-1801 Office phone: 1-607-254-1267(day) Official email:sg839 at cornell.edu Facebook:http://www.facebook.com/profile.php?id=100001986532253
• 918 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 10 weeks ago
United States
On 03/08/2012 01:59 PM, wang peter wrote: > i often meet this problem after trimming the adapters > > >> reads<- readFastq(fastqfile); > Error: Input/Output > file(s): > L003GAF-128.trimmed > message: unexpected empty line L003GAF-128.trimmed:61 Reading zero-length records has been enabled in the devel version ShortRead 1.13.16; use the devel version of R and install ShortRead via source('http://bioconductor.org/biocLite.R') biocLite('ShortRead') As Steve suggests, filtering on the way out might be sensible -- fq[width(fq) != 0]. Martin > > R version 2.14.1 (2011-12-22) > Platform: x86_64-redhat-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] 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.12.4 latticeExtra_0.6-19 RColorBrewer_1.0-5 > [4] Rsamtools_1.6.3 lattice_0.20-0 Biostrings_2.22.0 > [7] GenomicRanges_1.6.7 IRanges_1.12.6 > > loaded via a namespace (and not attached): > [1] Biobase_2.14.0 bitops_1.0-4.1 BSgenome_1.22.0 grid_2.14.1 > [5] hwriter_1.3 RCurl_1.91-1 rtracklayer_1.14.4 tools_2.14.1 > [9] XML_3.9-4 zlibbioc_1.0.0 > > -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793
ADD COMMENT
0
Entering edit mode
On 03/08/2012 03:45 PM, Martin Morgan wrote: > On 03/08/2012 01:59 PM, wang peter wrote: >> i often meet this problem after trimming the adapters >> >> >>> reads<- readFastq(fastqfile); >> Error: Input/Output >> file(s): >> L003GAF-128.trimmed >> message: unexpected empty line L003GAF-128.trimmed:61 > > Reading zero-length records has been enabled in the devel version > ShortRead 1.13.16; use the devel version of R and install ShortRead via I meant to say the 2.15 alpha version of R. > > source('http://bioconductor.org/biocLite.R') > biocLite('ShortRead') > > As Steve suggests, filtering on the way out might be sensible -- > fq[width(fq) != 0]. > > Martin > >> >> R version 2.14.1 (2011-12-22) >> Platform: x86_64-redhat-linux-gnu (64-bit) >> >> locale: >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 >> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 >> [7] LC_PAPER=C LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] 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.12.4 latticeExtra_0.6-19 RColorBrewer_1.0-5 >> [4] Rsamtools_1.6.3 lattice_0.20-0 Biostrings_2.22.0 >> [7] GenomicRanges_1.6.7 IRanges_1.12.6 >> >> loaded via a namespace (and not attached): >> [1] Biobase_2.14.0 bitops_1.0-4.1 BSgenome_1.22.0 grid_2.14.1 >> [5] hwriter_1.3 RCurl_1.91-1 rtracklayer_1.14.4 tools_2.14.1 >> [9] XML_3.9-4 zlibbioc_1.0.0 >> >> > > -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793
ADD REPLY
0
Entering edit mode
@steve-lianoglou-2771
Last seen 19 months ago
United States
Hi, On Thu, Mar 8, 2012 at 4:59 PM, wang peter <wng.peter at="" gmail.com=""> wrote: > i often meet this problem after trimming the adapters > > >> reads <- readFastq(fastqfile); > Error: Input/Output > ?file(s): > ? ?L003GAF-128.trimmed > ?message: unexpected empty line L003GAF-128.trimmed:61 One thing you can do is to avoid having empty lines in your FASTQ file. The question is: how are they getting there? What are you using to trim your reads? If you are doing it in R then saving the output, maybe you want to subset your trimmed object and remove 0-width fastq records before saving. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT

Login before adding your answer.

Traffic: 677 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6