Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genopipe

A pipeline for QC'ing and preparing genotyping data for imputation, combining genotyping data with a reference panel to determine ancestry with EIGENSTRAT, and QC'ing genotype vcf files post-imputation.

Converting files from GenomeStudio into PLINK format for use in this pipeline

Installing and Loading

GenomeStudio is an Illumina software that is only made for Windows. If using a Mac, install a Windows mirror with the following steps:

  1. Download the Windows 10 Disc Image (ISO File)
  2. Open Applications > Utilities > Boot Camp Assistant
  3. Follow the onscreen instructions to set up Boot Camp Assistant. When prompted, add downloaded Windows 10 ISO image.
  4. Switch between Mac and Windows by restarting and holding option.

Installing GenomeStudio:

  1. Download both GenomeStudio and PLINK Input Report Plug-in from Illumina here.

  2. Follow onscreen instructions to download and setup GenomeStudio.

Loading data into GenomeStudio and exporting into PLINK format

Do not open the included sample sheet before loading into Genome Studio because it will mess up the barcode formatting.

  1. Start a new Genotyping Project. Select "Use sample sheet to load sample intensities."
  2. On the next page of the Project Wizard, load the given sample sheet (.csv) under "Sample Sheet." Load the given images directory under "Data Repository." Load the given Manifest directory under "Manifest Repository."
  3. On the final page of the Project Wizard, click the box to "Import cluster positions from a cluster file." Load the given /Manifest > .egt file as the cluster file. Click Finish.
  4. To export a PLINK report, click Analysis > Reports > Custom Report > PLINK. A map and ped file should be generated.

Workflow

  1. Clone this entire repo into working directory:

    git clone https://github.com/nekramer/Genopipe.git
  2. Edit the comma-separated geno.csv with the project name, batch name, PLINK map/ped file prefix, and the path to these files under the Genotyping_Directory column. The names in the Proj and Batch columns will be used to create a group name for output files.

  3. Edit config/config.yaml for parameters specific to your analysis. The parameters are described below:

    ## Path to genotyping data samplesheet
    geno: 'geno.csv'
    
    ## Thresholds for variant inclusion in PLINK
    miss_call: 0.1 # PLINK --geno: Missing rate per SNP; A value of 0.1 will include only SNPs with a 90% genotyping rate (10% missing).
    maf: 0.01 # PLINK --maf: Minor allele frequency; A value of 0.01 will only include SNPs with a minor allele frequencey >= 0.01.
    hwe: .000001 # PLINK --hwe: Hardy-Weinberg equilibrium; Exclude markers that fail the Hardy-Weinberg test at a specified significance.
    remove: 'remove.txt' # Text file listing which, if any, samples to remove from data and which batch they should be removed from.
    
    ## Genome-specific reference parameters
    ref: '/proj/phanstiel_lab/References/genomes/1000G/GRCh37/1000G_phase3_chrALL_biallelic' # Path to population reference data in PLINK binary format (.bed, .bim,       .fam files), all autosomes merged.
    panel: '/proj/phanstiel_lab/References/genomes/1000G/GRCh37/1000G_phase3.panel' # Path to panel file of above population reference data. Must have the columns         `sample`, `pop`, `super_pop`, and `gender`.
    sequence: '/proj/phanstiel_lab/References/genomes/hg19/Sequence/hg19.fa' # Path to reference sequence fasta file.
    
    ## Eigensoft software path
    eigensoft: '/proj/phanstiel_lab/software/EIGENSOFT/EIG-6.1.4/bin' # Path to EIGENSOFT software directory.
    
    ## Additional options
    pop_name: 'CQTL' # Name of data 'population' to use as the label in ancestry PCA plot.

To check the genome build of raw genotyping data obtained via a GenomeStudio project, check the GenomeBuild column of the .csv file found under the Manifest directory.

Note: This pipeline requires an installation of Eigensoft. This software can be downloaded from https://github.com/DReichLab/EIG. To build the software on UNC Longleaf follow these steps:

```
unzip v8.0.0.zip
cd EIG-8.0.0/src
make clobber
module add openblas
make all OPENBLAS=/nas/longleaf/apps/openblas/0.2.19
make install
```

Then, update the path to the smartpca command on line 58 of EIG-8.0.0/bin/smartpca.perl.

  1. Submit the first workflow with sbatch:

    sbatch runGenopipe

After running these steps the pipeline will produce the following key files:

  • output/ancestry/ancestry.pdf: A plot of PC1 vs. PC2 of data merged with reference, colored by population.
  • output/imputation/{group}_chr{chr}.recode.vcf.gz: Gzipped vcf files, separated by chromosome, which are prepared for imputation.
  1. Impute data with imputation method of choice (i.e. Michigan Imputation Server) using an appropriate reference file.

  2. Edit the comma-separated vcf.csv with the chromosome and the full path/filename to the imputed vcf of that chromosome in the vcf_path field.

  3. Submit the second workflow to combine and QC these vcfs with sbatch:

    sbatch runGenopipeImputation

After running this workflow the pipeline will produce one qc'd, gzipped vcf file:

  • output/vcf/{group}_ALL_qc.vcf.gz

Troubleshooting

If an error occurs by misspecification of resources, a job's resources can be adjusted by editing config/cluster.yaml. To relaunch a workflow, unlock the directory with:

module load python/3.6.6
snakemake -j 1 -s snakefiles/genoProc --unlock #or
snakemake -j 1 -s snakefiles/postImputation --unlock

and relaunch with sbatch.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages