read nanopore Fastq file
1
0
Entering edit mode
@9d115a50
Last seen 3.7 years ago

Hi

what function I can use to read fastq file from Nanopore? My fastq file contain letter "U", so I cannot use ReadFastq() function from shortread library.

NanoporeRNASeq RNASeq • 1.7k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

You don't say what you want to do once you read it in. But anyway.

> library(Biostrings)
## I modified the FASTQ file in the ShortRead dir
> readLines(gzfile("C:/Users/jmacdon/AppData/Roaming/R/win-library/4.0/ShortRead/extdata/E-MTAB-1147/ERR127302_1_subset.fastq.gz"), 2)
[1] "@ERR127302.8493430 HWI-EUS350_0441:1:34:16191:2123#0/1"                  
[2] "GTCTGCTGTUTCTGTGTCGGCTGTCTCGCGGGACATGAAGTCAATGAAGGCCTGGAATGTCACTACCCCCAG"

## Note the U at pos 10

> z <- readRNAStringSet("C:/Users/jmacdon/AppData/Roaming/R/win-library/4.0/ShortRead/extdata/E-MTAB-1147/ERR127302_1_subset.fastq.gz", "fastq")
Error in .Call2("read_fastq_files", filexp_list, nrec, skip, seek.first.rec,  : 
  reading FASTQ file C:/Users/jmacdon/AppData/Roaming/R/win-library/4.0/ShortRead/extdata/E-MTAB-1147/ERR127302_1_subset.fastq.gz: line 2: read sequence contains invalid letters

## same error you get with ShortRead. Howeva

> z <- readBStringSet("C:/Users/jmacdon/AppData/Roaming/R/win-library/4.0/ShortRead/extdata/E-MTAB-1147/ERR127302_1_subset.fastq.gz", "fastq")
> z
BStringSet object of length 20000:
        width seq                                           names               
    [1]    72 GTCTGCTGTUTCTGTGTCGGC...CTGGAATGTCACTACCCCCAG ERR127302.8493430...
    [2]    72 CTUGGGCAATCTTTGCAGCAA...AGGCCAGAGCAGACCTTCGGG ERR127302.2140653...
    [3]    72 TGGGCTGTTCCTTCTCUCTGT...AGAGTCACGTTTCCCAAGTCT ERR127302.2217310...
    [4]    72 CTCUTCCACACCTTTGGTCTT...CTCAGCATCAAAGTTAGTATA ERR127302.1040226...
    [5]    72 GTTTGGUTATATGGAGGATGG...ATAGGGCAAGGACGCCTCCTA ERR127302.1948626...
    ...   ... ...
[19996]    72 GCGGGUGCGGCCAAAATGAAG...AAGAATCGCAAAAGGCATTTC ERR127302.2468696...
[19997]    72 TTGTUATCTACTCTTGAACAA...GGCAGCTAATAGTGTGAACCA ERR127302.8014168...
[19998]    72 TGTTGUTGGTGCTGGTTACTG...AGTTACACACAGCCCTGCCTC ERR127302.1481100...
[19999]    72 CGGUGGTGCAGCCCCCGCCCA...ACCTGCCCGAGTTCATTGTGA ERR127302.1875050...
[20000]    72 GCUAGGGCGTCATGCTGGCCG...TCAACATCCCCAACGAGGACT ERR127302.1454058...
ADD COMMENT

Login before adding your answer.

Traffic: 546 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