From Genome Analysis Wiki
Jump to navigationJump to search
442 bytes added
, 15:09, 14 February 2012
Line 98: |
Line 98: |
| | | |
| Till now, we only finished read mapping for one sample SAMPLE1. We need to repeat this step for other samples (SAMPL2 - SAMPLE40). You can try something like: | | Till now, we only finished read mapping for one sample SAMPLE1. We need to repeat this step for other samples (SAMPL2 - SAMPLE40). You can try something like: |
| + | |
| + | For c shell |
| | | |
| foreach file (`ls fastq/SAMPLE*.fastq | cut -f 2 -d '/' | cut -f 1 -d '.'`) | | foreach file (`ls fastq/SAMPLE*.fastq | cut -f 2 -d '/' | cut -f 1 -d '.'`) |
Line 106: |
Line 108: |
| bin/samtools index bams/$file.bam | | bin/samtools index bams/$file.bam |
| end | | end |
| + | |
| + | For bash shell |
| + | |
| + | for file in `ls fastq/SAMPLE*.fastq | cut -f 2 -d '/' | cut -f 1 -d '.'`; |
| + | do echo $file; |
| + | bin/bwa aln -q 15 ref/human_g1k_v37_chr20.fa fastq/$file.fastq > bwa.sai/$file.sai; |
| + | bin/bwa samse -r "@RG\tID:ILLUMINA\tSM:$file" ref/human_g1k_v37_chr20.fa bwa.sai/$file.sai fastq/$file.fastq | \ |
| + | bin/samtools view -uhS - | bin/samtools sort -m 2000000000 - bams/$file; |
| + | bin/samtools index bams/$file.bam; |
| + | done |
| | | |
| | | |