9 SnipSnip Examples

9.1 Basic example

Using the example data given with the SnipSnip download, perform a basic SnipSnip analysis as follows:

./snipsnip -o results-ExampleData.dat exampleData.bed

In R type:

exampleData<-read.table("results-ExampleData.dat", header=T)

plot(exampleData$BP/10^6, -log10(exampleData$P), main="SnipSnip Test",
 xlab=expression(bp~position~(Mb)), ylab=expression(-log[10](p-value)), ylim=c(0,15)) 
abline(h=8, lty=2)

This will produce the following plot:



Figure 3. Manhattan plot of AI test results.

To also perform standard logistic regression use the -lr option as follows:

./snipsnip -lr -o results-ExampleData-LR.dat exampleData.bed

To plot the standard logistic regression test results type:

exampleDataLR<-read.table("results-ExampleData-LR.dat", header=T)

plot(exampleDataLR$BP/10^6, -log10(exampleDataLR$P_LR), main="Standard Logistic Regression",
 xlab=expression(bp~position~(Mb)), ylab=expression(-log[10](p-value)), ylim=c(0,15)) 
abline(h=8, lty=2)

This will produce the following plot:



Figure 4. Manhattan plot of standard logistic regression test results.

9.2 X chromosome

SnipSnip does not do anything special with the analysis of SNPs on the X chromosome - the SNPs will be treated as if they were autosomal. (So females will end up with genotypes coded 0,1,2 and males will end up with genotypes coded 0,2). This has the potential to create false positives if you are dealing with a disease that has different prevalance in males and females; for this reason it is recommended to always include gender as a covariate if you are analysing X-chromosomal SNPs. See section 8 for details on handling covariates.

If you have no other covariates to consider then it is possible to use the .fam file as the covariate file by choosing the sex column as the covariate as follows:

./snipsnip -covar chromosome23.fam -covar-number 3 -o myresults-chr23.dat chromosome23.bed