From UABgrid Documentation
Revision as of 17:04, 19 December 2011 by Curtish@uab.edu
Protocol for Filtering common SNPs from a set of alignments
Galaxy supports set operations on single columns. Thus, I build an index column for each sample formated as "chr:pos:ref:alt", which I refer to as the indexAlt.
- Text Manipulation
- Concatenate Datasets tail-to-head
- Filter data on any column
- Join, Subtract and Group
- Group data by a column
- Compare two Datasets
Step by Step
- For each sample
- Creating the BAM files (usually with BWA + GATK realigner)
- Create VCF of variant SNPs (mpileup or GATK)
- Run snpEffect, compute the "indexAlt" column and extract that index to it's own file
- I use the workflow a workflow to run SOP: index snpEffect with Sample name, which actually computes several other files and indices need for building an SNP vs Samples grid.
chrLAB 0 . chrLAB JH03_B8M2 0 . JH03_B8M2 JH03_B8M2 JH03_B8M2 JH03_B8M2 JH03_B8M2 chrLAB:0:chrLAB chrLAB:0:chrLAB:JH03_B8M2 chrI 2323 . C T 471.72 . AC=1;AF=0.50;AN=2;BaseQRankSum=0.330;DP=234;Dels=0.00;FS=21.822;HRun=2;HaplotypeScore=4.4329;MQ=44.55;MQ0=0;MQRankSum=-10.441;QD=2.02;ReadPosRankSum=0.083;EFF=DOWNSTREAM(LOW|||YAL067C|CALC_BIOTYPE||YAL067C|),DOWNSTREAM(LOW|||YAL068 W-A|CALC_BIOTYPE||YAL068W-A|),DOWNSTREAM(LOW|||YAL069W|CALC_BIOTYPE||YAL069W|),UPSTREAM(LOW|||YAL067W-A|CALC_BIOTYPE||YAL067W-A|),UPSTREAM(LOW|||YAL068C|CALC_BIOTYPE||YAL068C|) GT:AD:DP:GQ:PL 0/1:175,58:234:99:502,0,6142 DOWNSTREAM(LOW|||YAL067C|CALC_BIOTY PE||YAL067C|),DOWNSTREAM(LOW|||YAL068W-A|CALC_BIOTYPE||YAL068W-A|),DOWNSTREAM(LOW|||YAL069W|CALC_BIOTYPE||YAL069W|),UPSTREAM(LOW|||YAL067W-A|CALC_BIOTYPE||YAL067W-A|),UPSTREAM(LOW|||YAL068C|CALC_BIOTYPE||YAL068C|) 0/1 chrI:2323:C chrI:2323:C:T
- Concanate idxAlt files from all samples into one file
chrLAB:0:chrLAB:JH01_B8M1 chrI:2323:C:T chrI:2331:A:C chrI:3981:A:T ...
- Group on c1, computing count(c1)
- this produces one line for every SNP in any sample, with a count of how many samples it appears in
- Filter to select only records where count()=num_samples
2micron:265:G:A 10 chrI:100399:G:C 10 chrI:101282:C:A 10
- For each sample, remove the common SNP rows