マッチングとフィルタリング

Rで始めるBioconductor入門

Paula Andrea Martinez, PhD.

Data Scientist

重複配列

  • 生物学的配列の重複は自然界でも発生する
  • ライブラリ調製工程(PCR)による増幅
  • サンプルの複数回シーケンシング

重複の除去またはマーキング

  • ゲノム全域・エクソームシーケンシング

閾値を用いた重複のマーキング

  • RNA-seq・ChIP-seq
Rで始めるBioconductor入門

srduplicated

library(ShortRead)

# Counting duplicates TRUE is the number of duplicates table(srduplicated(dfqsample))
FALSE  TRUE 
500   500
# Cleaning reads from duplicates x[fun(x)]
cleanReads <- mydReads[srduplicated(mydReads) == FALSE]

# Counting duplicates table(srduplicated(cleanReads))
FALSE
500
Rで始めるBioconductor入門

カスタムフィルターの作成

srFilter で条件に基づくフィルタリング x[fun(x)]

フィルターの例

library(ShortRead)

# Use a custom filter to remove reads from fqsample # This filter to remove reads shorter than a min number of bases readWidthCutOff <- srFilter(function(x) {width(x) >= minWidth}, name = "MinWidth")
minWidth <- 51
fqsample[readWidthCutOff(fqsample)]
Rで始めるBioconductor入門

nFilter

library(ShortRead)

# save your filter, .name is optional myFilter <- nFilter(threshold = 10, .name = "cleanNFilter")
# use the filter at reading point filtered <- readFastq(dirPath = "data", pattern = ".fastq", filter = myFilter) # you will retrieve only those reads that have a maximum of 10 N's filtered
Rで始めるBioconductor入門

idFilter と polynFilter

library(ShortRead)

#id filter example myFilterID <- idFilter(regex = ":3:1") # will return only those ids that contain the regular expression # optional parameters are .name, fixed and exclude # use the filter at reading point filtered <- readFastq(dirPath = "data", pattern = ".fastq", filter = myFilterID)
# filter to remove poly-A regions myFilterPolyA <- polynFilter(threshold = 10, nuc = c("A")) # will return the sequences that have a maximun number of 10 consecutive A's
# use the filter for subsetting filtered[myFilterPolyA(filtered)]
Rで始めるBioconductor入門

フィルターを使って練習しましょう!

Rで始めるBioconductor入門

Preparing Video For Download...