*** New Version 2.2*** Users can supply customised labeled reference data, so the classification is no longer limited to the groups defined in the 1000 Genomes project.
*** New Version 2.1 and 2.11*** Performance has been significantly improved (20-100x faster) by re-writing part of the tool set in C++. There is no change in the functionality; therefore, it is strongly recommended to use the versions v2.1x.
*** New Version 2.01 (batch processing)*** SNP2pop functionality stays the same, but v2.01 supports batch processing from command line, i.e. no typing in docker environment. Details see below.
This tool supports mapping from B-allele frequency data generated with 9 Affymetrix SNP array platforms as well as whole-genome sequencing data as input and a population assignment to one of the five continental groups (with 97.1% accuracy, benchmarked with paired TCGA data) or one of the 26 population groups (with 92.7% accuracy, benchmarked with paired TCGA data).
The currently supported genome version is GRCh37 (hg19). A mapping to other genome versions is planned.
First, you need to create a working directory $hostdir (use absolute path) to copy your input files and to receive the output from the pipeline. (file will be modified, so please only copy your original file into this folder.)
docker run -it --rm --mount type=bind,source=$hostdir,target=/data baudisgroup/snp2pop
After entering the interactive mode of the container, you can place your input files in $hostdir/input directory. Then:
Rscript --vanilla run_pop.r <parameters>
Then you will obtain your mapping results in the /results folder under $hostdir.
You need to download the /test_SNP folder from here and copy the absolute path as $test_dir. These 2 files are processed BAF files from GEO repository with genotyping platform "Mapping250K_Sty".
*** v2.0*** Interactive mode is prompted, so the process is run in two steps. First step, set up the docker environment, and 2nd step, type in R command. Step1:
docker run -it --rm --mount type=bind,source=$test_dir,target=/data baudisgroup/snp2pop
Step2:
If you use the /test_SNP, run the following command:
Rscript --vanilla run_pop.r -i BAF -o CONT -p Mapping250K_Sty
If you use sequencing data, run the following command:
Rscript --vanilla run_pop.r -i GZVCF -p Sequencing -o ALL
For testing sequencing data, you can download the 1000Genomes phase3 version 5 data from 1000Genomes project FTP site (ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502).
*** v2.01 [For more advanced users and batch processing] ***
Docker container is run in background, and does not shut off unless explicitly killed.
In a for loop, run the following command:
docker run -d --name test --mount type=bind,source=$test_dir,target=/data baudisgroup/snp2pop:v2.01
docker exec -d test Rscript --vanilla run_pop.r -i BAF -o ALL -p Mapping250K_Sty
After checking the existence of result file, run
docker rm --force test
and go to the next loop.
| Options | Type | Description |
|---|---|---|
| -i --input | TEXT | input as B allele frequency file format (BAF), or genotype calling format (GC), Birdseed genotype format (BS) for SNP array data, or Variant Call Format (VCF) / gzipped VCF (GZVCF) for sequencing data. |
| -p --platform | TEXT | SNP array platform (see below), or Sequencing. |
| -o --output | TEXT | output as 9 theoretical fractions (FRAC), or output as ratio of 5 continental groups with a voting result (CONT) or ratio of 26 population groups with a voting result (POP), or both 26 populations and 5 continental groups summarized from the 26 population voting output (ALL). For customized references, the output will be by provided labels. |
| -r --reference * | TEXT | Default reference of the software is 2492 samples from 1000 Genomes project. But optionally user can provide customized references composed of 2 files: vcf file, sample label file. Here the parameter format is two file names separated by comma. |
* new in v2.2
The input file can be SNP array output or sequencing data.
In case of sequencing data, vcf or vcf.gz file formats are supported as input for sequencing data. Only one vcf file should be placed in the directory.
In case of SNP array output, file should be tab separated. There should be 4 columns: ID (SNP ID or simply indicating row number), chromosome (1-23), nucleotide base position, and a value column (a number within 0-1 if BAF format, or AA/AB/BB if GC format).
| ID | CHRO | BASEPOS | VALUE |
|---|---|---|---|
| SNP_A-2131660 | 1 | 1220751 | 0.3487 |
| SNP_A-1967418 | 1 | 2302812 | 0.9451 |
| SNP_A-1969580 | 1 | 2398125 | 1.0000 |
| SNP_A-4263484 | 1 | 2622185 | 0.4612 |
| ... | ... | ... | ... |
| ID | CHRO | BASEPOS | VALUE |
|---|---|---|---|
| SNP_1 | 1 | 1220751 | AB |
| SNP_2 | 1 | 2302812 | BB |
| SNP_3 | 1 | 2398125 | BB |
| SNP_4 | 1 | 2622185 | AB |
| ... | ... | ... | ... |
| ID | CHRO | BASEPOS | VALUE |
|---|---|---|---|
| SNP_1 | 1 | 1220751 | 1 |
| SNP_2 | 1 | 2302812 | 2 |
| SNP_3 | 1 | 2398125 | 2 |
| SNP_4 | 1 | 2622185 | 1 |
| ... | ... | ... | ... |
Two files are needed:
| ID | label |
|---|---|
| HG00096 | GBR |
| HG00101 | GBR |
| ... | ... |
* new in v2.2
For sequencing data, "Sequencing" should be used.
For SNP array, one of the following 9 array platforms should be named:
| Options | Description |
|---|---|
| FRAC | the 9 fractional values representing estimated theoretical ancestors from admixture model. |
| CONT | voting percentage of 5 continental groups, the final result with highest vote and a confidence score* . |
| POP | voting percentage of 26 population groups, the final result with highest vote and a confidence score* . |
| ALL | voting percentage of 26 population groups, the final result with highest vote and a confidence score* . In addition, the voting summary of the population groups belonging to each continental group, then a final result of predicted continental group with a confidence score * . |
* confidence score: the different between highest and second highest voting percentage.
Content type
Image
Digest
Size
358.7 MB
Last updated
almost 6 years ago
docker pull baudisgroup/snp2pop