简介
(1)下载fastq.gz文件
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR127/ERR127302/ERR127302_1.fastq.gz
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR127/ERR127302/ERR127302_2.fastq.gz
ps:下载中途卡死了,(⊙﹏⊙)b
补救: 1. we can use ctrl+z to stop it, Note: not ctrl+c.
2. resume it via wget -c url
又可以了。。。
(2)加载数据
library(ShortRead)
sampler <- FastqSampler('ERR127302_1.fastq.gz', 20000)
set.seed(123); ERR127302_1 <- yield(sampler)
sampler <- FastqSampler('ERR127302_2.fastq.gz', 20000)
(3)基础功能
fq <- yield(sampler)
fl <- system.file(package="ShortRead", "extdata", "E-MTAB-1147",
+ "ERR127302_1_subset.fastq.gz")
countFastq(fl)
fq <- readFastq(fl)
fq[1:5]
head(sread(fq), 3)
head(quality(fq), 3)
encoding(quality(fq))