Commit f6896369 authored by Pierre Lindenbaum's avatar Pierre Lindenbaum
Browse files

cont

parent 992517fd
......@@ -6,6 +6,8 @@ Certaines étapes seront effectuées plusieurs fois (père, mère, enfant) je vo
Certains outils ont besoin de place; le cas échéant, faites de la place, videz vos répertoires temporaires.
La version de l'outil samtools actuellement installée à la fac est une vieille version (1.2). Elle est suffisante pour ce TP mais les commandes avec la nouvelles version de samtools sera légerement différent.
## Recupération des données FASTQ
Les données sont téléchargeables à l'adresse suivante : http://filex.univ-nantes.fr/get?k=moyINN3cCurgIm1BFwb
......
java.exe=java
BAMS= /commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-E/BAM/20150604_10-01-BL-E_final.bam \
/commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-M/BAM/20150604_10-01-BL-M_final.bam \
/commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-P/BAM/20150604_10-01-BL-P_final.bam
.PHONY: all zip
REG= 22:22707000-23803000 MT:3910-4250
SPLIT=48000
REG= "22:22707000-23803000" "MT:3910-4250"
all: $(addprefix DATA/,child.R1.fq.gz mother.R1.fq.gz father.R1.fq.gz)
......@@ -15,26 +11,26 @@ DATA.zip: $(addprefix DATA/,child.R1.fq.gz mother.R1.fq.gz father.R1.fq.gz)
rm -f $@
zip $@ -r DATA
DATA/child.R1.fq.gz :
DATA/child.R1.fq.gz :/commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-E/BAM/20150604_10-01-BL-E_final.bam
mkdir -p DATA
samtools view -b -o jeter.bam /commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-E/BAM/20150604_10-01-BL-E_final.bam ${REG}
${java.exe} -jar /commun/data/packages/picard/picard-tools-1.126/picard.jar \
SamToFastq I=jeter.bam F=DATA/child.R1.fq.gz F2=DATA/child.R2.fq.gz FU=jeter.fq.gz VALIDATION_STRINGENCY=LENIENT
rm -f jeter.fq.gz jeter.bam
samtools view -h $< ${REG} "22:45055413-45078846" "22:45130433-45165412" | sed '/^@HD/s/ SO\:coordinate//' > jeter.sam
samtools sort -n -T tmp jeter.sam | samtools fastq -1 DATA/child.R1.fq -2 DATA/child.R2.fq -s jeter.fq -
rm -f jeter.fq jeter.sam
gzip -f --best DATA/child.R1.fq DATA/child.R2.fq
DATA/mother.R1.fq.gz :
DATA/mother.R1.fq.gz : /commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-M/BAM/20150604_10-01-BL-M_final.bam
mkdir -p DATA
samtools view -b -o jeter.bam /commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-M/BAM/20150604_10-01-BL-M_final.bam ${REG}
${java.exe} -jar /commun/data/packages/picard/picard-tools-1.126/picard.jar \
SamToFastq I=jeter.bam F=DATA/mother.R1.fq.gz F2=DATA/mother.R2.fq.gz FU=jeter.fq.gz VALIDATION_STRINGENCY=LENIENT
rm -f jeter.fq.gz jeter.bam
samtools view -h $< ${REG} "22:45055413-45165412" | sed '/^@HD/s/ SO\:coordinate//' > jeter.sam
samtools sort -n -T tmp jeter.sam | samtools fastq -1 DATA/mother.R1.fq -2 DATA/mother.R2.fq -s jeter.fq -
rm -f jeter.fq jeter.sam
gzip -f --best DATA/mother.R1.fq DATA/mother.R2.fq
DATA/father.R1.fq.gz :
DATA/father.R1.fq.gz : /commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-P/BAM/20150604_10-01-BL-P_final.bam
mkdir -p DATA
samtools view -b -o jeter.bam /commun/data/projects/plateforme/NTS-015_ENS_Bezieau_HUGODIMS/20150604/align/Samples/10-01-BL-P/BAM/20150604_10-01-BL-P_final.bam ${REG}
${java.exe} -jar /commun/data/packages/picard/picard-tools-1.126/picard.jar \
SamToFastq I=jeter.bam F=DATA/father.R1.fq.gz F2=DATA/father.R2.fq.gz FU=jeter.fq.gz VALIDATION_STRINGENCY=LENIENT
rm -f jeter.fq.gz jeter.bam
samtools view -h $< ${REG} "22:45055413-45165412" | sed '/^@HD/s/ SO\:coordinate//' > jeter.sam
samtools sort -n -T tmp jeter.sam | samtools fastq -1 DATA/father.R1.fq -2 DATA/father.R2.fq -s jeter.fq -
rm -f jeter.fq jeter.sam
gzip -f --best DATA/father.R1.fq DATA/father.R2.fq
1000G_omni2.5.b37.vcf 1000G_phase1.snps.high_confidence.b37.vcf Mills_and_1000G_gold_standard.indels.b37.vcf :
......
......@@ -16,13 +16,13 @@ $(1).sam : DATA/$(1).R1.fq.gz DATA/$(1).R2.fq.gz ref.fa.bwt
endef
all: result.vcf.gz.tbi
result.vcf.gz.tbi: result.vcf.gz
tabix --force --preset vcf $<
result.vcf.gz: result.bcf
bcftools call --ploidy GRCh38 --multiallelic-caller --variants-only --output-type z -o $@ --format-fields GQ,GP $<
bcftools call --ploidy GRCh37 --multiallelic-caller --variants-only --output-type z -o $@ --format-fields GQ,GP $<
result.bcf : $(addsuffix .bam.bai,child father mother) $(addsuffix .bam,child father mother) ref.fa.fai
samtools mpileup -g --uncompressed --output-tags DP --reference ref.fa --output $@ $(filter %.bam,$^)
......@@ -38,5 +38,8 @@ ref.fa.bwt: ref.fa
ref.fa.fai: ref.fa
samtools faidx $<
ref.fa:
curl "http://hgdownload.cse.ucsc.edu/goldenPath/hg38/chromosomes/chr22.fa.gz" | gunzip -c > $@
curl "http://hgdownload.cse.ucsc.edu/goldenPath/hg38/chromosomes/chrM.fa.gz" | gunzip -c >> $@
wget -O - "http://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes/chr22.fa.gz" | gunzip -c > $@
wget -O - "http://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes/chrM.fa.gz" | gunzip -c >> $@
clean:
rm -f ref.* child.* father.* mother.* result.*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment