매칭 및 필터링

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...