7 对比对和变异结果用IGV进行可视化

BRCA1基因为例

1 找到BRCA1在gtf文件中的坐标

zcat /mnt/f/kelly/bioTree/server/wesproject/reference/gencode.v25.annotation.gtf.gz |grep -w BRCA1|head|less -SN
1 chr17 HAVANA gene 43044295 43170245 . - . gene_id "ENSG00000012048.20";
2 chr17 HAVANA transcript 43044295 43125370 . - . gene_id "ENSG00000012
3 chr17 HAVANA exon 43125271 43125370 . - . gene_id "ENSG00000012048.20";
4 chr17 HAVANA exon 43124017 43124115 . - . gene_id "ENSG00000012048.20";
5 chr17 HAVANA CDS 43124017 43124096 . - 0 gene_id "ENSG00000012048.20";
6 chr17 HAVANA start_codon 43124094 43124096 . - 0 gene_id "ENSG00000012
7 chr17 HAVANA exon 43115726 43115779 . - . gene_id "ENSG00000012048.20";
8 chr17 HAVANA CDS 43115726 43115779 . - 1 gene_id "ENSG00000012048.20";
9 chr17 HAVANA exon 43106456 43106533 . - . gene_id "ENSG00000012048.20";
10 chr17 HAVANA CDS 43106456 43106533 . - 1 gene_id "ENSG00000012048.20";
~
2提取BRCA在各个bam文件的read信息
$ ls -lh SRR7696207*.bam|cut -d " " -f 5-
3.9G Jun 2 21:40 SRR7696207.bam
8.2G Jun 5 18:56 SRR7696207_bqsr.bam
5.1G Jun 2 22:06 SRR7696207_marked.bam
5.1G Jun 2 23:24 SRR7696207_marked_fixed.bam
提取上述个bam中的BRCA1基因的reads
samtools view -h SRR8517856.bam chr17:43044295-43170245|samtools sort -o SRR7696207.brca1.bam -
samtools view -h SRR8517856_bqsr.bam chr17:43044295-43170245|samtools sort -o SRR7696207_bqsr.brca1.bam -
samtools view -h SRR8517856_marked.bam chr17:43044295-43170245|samtools sort -o SRR7696207_marked.brca1.bam -
samtools view -h SRR8517856_marked_fixed.bam chr17:43044295-43170245|samtools sort -o SRR7696207_marked_fixed.brca1.bam -
得到的brca1.bam文件如下
ls -lh *brca1.bam
-rwxrwxrwx 1 root root 661K Jun 7 14:26 SRR7696207_bqsr.brca1.bam
-rwxrwxrwx 1 root root 420K Jun 7 14:26 SRR7696207.brca1.bam
-rwxrwxrwx 1 root root 422K Jun 7 14:29 SRR7696207_marked.brca1.bam
-rwxrwxrwx 1 root root 423K Jun 7 14:27 SRR7696207_marked_fixed.brca1.bam
为上述所有brca1.bam文件构建index
ls *.brca1.bam|xargs -i samtools index {}
-rwxrwxrwx 1 root root 661K Jun 7 14:26 SRR7696207_bqsr.brca1.bam
-rwxrwxrwx 1 root root 48K Jun 7 14:31 SRR7696207_bqsr.brca1.bam.bai
-rwxrwxrwx 1 root root 420K Jun 7 14:26 SRR7696207.brca1.bam
-rwxrwxrwx 1 root root 48K Jun 7 14:31 SRR7696207.brca1.bam.bai
-rwxrwxrwx 1 root root 422K Jun 7 14:29 SRR7696207_marked.brca1.bam
-rwxrwxrwx 1 root root 48K Jun 7 14:31 SRR7696207_marked.brca1.bam.bai
-rwxrwxrwx 1 root root 423K Jun 7 14:27 SRR7696207_marked_fixed.brca1.bam
-rwxrwxrwx 1 root root 48K Jun 7 14:31 SRR7696207_marked_fixed.brca1.bam.bai
把上述文件下载到本地IGV查看
注意,igv同时需要.bam和相应的.bai文件,所以需要把整个文件夹cp。
(0)

相关推荐