User Tools

Site Tools


extracting_mapped_reads

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
extracting_mapped_reads [2018/05/18 10:18] – created hyjeongextracting_mapped_reads [2021/03/17 13:09] (current) – external edit 127.0.0.1
Line 11: Line 11:
  
 사용할 read mapper는 Sanger Institute의 [[https://www.sanger.ac.uk/science/tools/smalt-0|SMALT]]이다.  사용할 read mapper는 Sanger Institute의 [[https://www.sanger.ac.uk/science/tools/smalt-0|SMALT]]이다. 
 +
 +**SMALT** employs a hash index of short words up to 20 nucleotides long and sampled at equidistant steps along the reference genome. For each sequencing read, potentially matching segments in the reference genome are identified from seed matches in the index and subsequently aligned with the read using dynamic programming.
 ===== (SMAT) Indexing & mapping ===== ===== (SMAT) Indexing & mapping =====
 SMALT v0.7.6은 bioconda 환경으로 설치해 두었다(base environment). SMALT v0.7.6은 bioconda 환경으로 설치해 두었다(base environment).
 +
   $ smalt index -k 14 -s 8 REF reference.fasta   $ smalt index -k 14 -s 8 REF reference.fasta
   $ smalt map -n 16 -f bam -o mapped.bam REF reads_1.fastq reads_2.fasta     $ smalt map -n 16 -f bam -o mapped.bam REF reads_1.fastq reads_2.fasta  
   $ samtools stats mapped.bam | grep ^SN | cut -f 2- # mapping report 출력   $ samtools stats mapped.bam | grep ^SN | cut -f 2- # mapping report 출력
 +  
 +-k 14 -8의 의미는 reference.fasta 파일에서 길이 14 bp의 word를 매 8번째 위치마다 샘플링한다는 뜻이다. 이렇게 인덱스 처리된 reference sequence는 "REF"라는 이름으로 mapping에 사용하면 된다.
 ===== Mapped read를 pair 형태로 꺼내는 방법 ===== ===== Mapped read를 pair 형태로 꺼내는 방법 =====
 나의 질문은 Biostars의 다음 질문과 매우 흡사하다. 나의 질문은 Biostars의 다음 질문과 매우 흡사하다.
Line 29: Line 34:
   $ cat list_both list_single > list_all   $ cat list_both list_single > list_all
   $ seqtk subseq reads_1.fastq list_all > subset_1.fastq   $ seqtk subseq reads_1.fastq list_all > subset_1.fastq
-  $ seqtk subseq reads_2.fastq list_all > subset_1.fastq+  $ seqtk subseq reads_2.fastq list_all > subset_2.fastq 
 +   
 +{{:20180518_2.png?400|}}
  
 +첫번째 명령에서는 samtools view의 출력물 중에서 홀수 라인만을 추출하였다. 이렇게 하지 않으면 read name이 연달아 두 줄에 나타나기 때문이다(pair이므로) <= 그런데 지금 회고해 보니 정확하지 않음을 알 수 있었다. 왤까? --- //[[hyjeong@kribb.re.kr|Haeyoung Jeong]] 2019/08/07 14:41//
extracting_mapped_reads.1526606335.txt.gz · Last modified: (external edit)