Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/pgs/getting-started.md
  • Loading branch information
lukfor committed Mar 22, 2024
2 parents 77fcdb0 + 8b864e9 commit 65392ab
Show file tree
Hide file tree
Showing 19 changed files with 89 additions and 12 deletions.
14 changes: 13 additions & 1 deletion docs/data-sensitivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@ Since data is transfered to our server located in Michigan, a wide array of secu
- After imputation is finished, the data uploader has 7 days to use an encrypted connection to get results back.
- The complete source code is available in a [public Github repository](https://github.com/genepi/imputationserver/tree/qc-refactoring).


## Who has access?

To upload and download data, users must register with a unique e-mail address and strong password. Each user can only download imputation results for samples that they have themselves uploaded; no other imputation server users will be able to access your data.

## Cookies

We value your privacy and are committed to transparency regarding the use of cookies on our website. Below, we outline our cookie policy to provide you with clarity and assurance.

### What are cookies?
Cookies are small text files that are placed on your device when you visit a website. They serve various purposes, including enhancing user experience, facilitating website functionality, and analyzing website traffic.

### How do we use cookies?
We use cookies only for the purpose of facilitating login functionality. These cookies help us recognize your device and authenticate your access to our platform securely. We do not track any personal information or analyze user activities through cookies.

### Why do we use cookies?
Cookies are essential for providing seamless login experiences to our users. By storing authentication information, cookies enable you to access your account efficiently without the need for repetitive login procedures. We respect your privacy and limit cookie usage exclusively to login purposes.


## What security or firewalls protect access?

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Our server offers genotype imputation from different reference panels. The most
- CAAPA - African American Panel
- HapMap 2

More details about all available reference panels can be found [here](/reference-panels/).
More details about all available reference panels can be found [here](https://imputationserver.readthedocs.io/en/latest/reference-panels/).

### Upload VCF files from your computer

Expand Down
2 changes: 1 addition & 1 deletion docs/pgs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Our PGS extension offers genotype imputation from different reference panels. Th
- 1000 Genomes Phase 1 (Version 3)
- HapMap 2

More details about all available reference panels can be found [here](reference-panels/). If you are unsure which reference panel to use, the "1000 Genomes Phase 3 (Version 5)" reference panel is multi-ancestry and has high coverage with available scores. However, if your uploaded data is European only, the HRC reference panel could be the better choice, as it enables the imputation of rare European-specific variants.
More details about all available reference panels can be found [here](https://imputationserver.readthedocs.io/en/latest/pgs/reference-panels/. If you are unsure which reference panel to use, the "1000 Genomes Phase 3 (Version 5)" reference panel is multi-ancestry and has high coverage with available scores. However, if your uploaded data is European only, the HRC reference panel could be the better choice, as it enables the imputation of rare European-specific variants.

### Upload VCF files from your computer

Expand Down
2 changes: 1 addition & 1 deletion files/imputationserver-beagle.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id: imputationserver-beagle
name: Genotype Imputation supporting Beagle (Minimac4)
description: This is the new Michigan Imputation Server Pipeline using <a href="https://github.com/statgen/Minimac4">Minimac4</a>. Documentation can be found <a href="http://imputationserver.readthedocs.io/en/latest/">here</a>.<br><br>If your input data is <b>GRCh37/hg19</b> please ensure chromosomes are encoded without prefix (e.g. <b>20</b>).<br>If your input data is <b>GRCh38hg38</b> please ensure chromosomes are encoded with prefix 'chr' (e.g. <b>chr20</b>).
version: 2.0.0-beta1
version: 2.0.0
website: https://imputationserver.readthedocs.io
category:

Expand Down
2 changes: 1 addition & 1 deletion files/imputationserver-hla.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id: imputationserver-hla
name: Genotype Imputation HLA (Minimac4)
description: This is the new Michigan Imputation Server Pipeline using <a href="https://github.com/statgen/Minimac4">Minimac4</a>. Documentation can be found <a href="http://imputationserver.readthedocs.io/en/latest/">here</a>.<br><br>If your input data is <b>GRCh37/hg19</b> please ensure chromosomes are encoded without prefix (e.g. <b>20</b>).<br>If your input data is <b>GRCh38hg38</b> please ensure chromosomes are encoded with prefix 'chr' (e.g. <b>chr20</b>).
version: 2.0.0-beta1
version: 2.0.0
website: https://imputationserver.readthedocs.io
category:

Expand Down
6 changes: 2 additions & 4 deletions files/imputationserver-pgs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
id: imputationserver-pgs
name: Polygenic Score Calculation
description: "You can upload genotyped data and the application imputes your genotypes, performs ancestry estimation and finally calculates Polygenic Risk Scores.<br><br>No dataset at hand? No problem, download our example dataset: <a href=\"https://imputationserver.sph.umich.edu/resources/50-samples.zip\" class=\"btn btn-sm btn-secondary\" style=\"color:#ffffff !important\"><i class=\"fa fa-file\"></i> 50-samples.zip</a><br><br>"


version: 2.0.0-beta1
version: 2.0.0
website: https://imputationserver.readthedocs.io/en/latest/pgs/getting-started
category:

Expand Down Expand Up @@ -72,7 +70,7 @@ workflow:
inputs:

- id: refpanel
description: Reference Panel (<a href="https://imputationserver.sph.umich.edu/start.html#!pages/refpanels" target="_blank">Details</a>)
description: Reference Panel (<a href="https://imputationserver.readthedocs.io/en/latest/pgs/reference-panels/" target="_blank">Details</a>)
type: app_list
category: RefPanel

Expand Down
2 changes: 1 addition & 1 deletion files/minimac4.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id: imputationserver
name: Genotype Imputation (Minimac4)
description: This is the new Michigan Imputation Server Pipeline using <a href="https://github.com/statgen/Minimac4">Minimac4</a>. Documentation can be found <a href="http://imputationserver.readthedocs.io/en/latest/">here</a>.<br><br>If your input data is <b>GRCh37/hg19</b> please ensure chromosomes are encoded without prefix (e.g. <b>20</b>).<br>If your input data is <b>GRCh38hg38</b> please ensure chromosomes are encoded with prefix 'chr' (e.g. <b>chr20</b>).
version: 2.0.0-beta1
version: 2.0.0
website: https://imputationserver.readthedocs.io
category:

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>genepi</groupId>
<artifactId>imputationserver</artifactId>
<version>2.0.0-beta1</version>
<version>2.0.0</version>
<packaging>jar</packaging>
<name>University of Michigan Imputation Server</name>
<url>http://maven.apache.org</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public boolean run(WorkflowContext context) {
double sampleCallrate = panel.getQcFilterByKey("sampleCallrate");
double mixedGenotypesChrX = panel.getQcFilterByKey("mixedGenotypeschrX");
int strandFlips = (int) (panel.getQcFilterByKey("strandFlips"));
int alleleSwitches = (int) (panel.getQcFilterByKey("alleleSwitches"));
String ranges = panel.getRange();

if (ranges != null) {
Expand Down Expand Up @@ -336,6 +337,15 @@ else if (task.getStrandFlipSimple() + task.getStrandFlipAndAlleleSwitch() > stra
return false;
}

// Check if too many allele switches are detected
else if (task.getAlleleSwitch() > alleleSwitches) {
text.append("<br><b>Error:</b> More than " + alleleSwitches
+ " allele switches have been detected. Imputation cannot be started!");
context.error(text.toString());

return false;
}

else if (task.isChrXMissingRate()) {
text.append(
"<br><b>Error:</b> Chromosome X nonPAR region includes > 10 % mixed genotypes. Imputation cannot be started!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public class ImputationPipeline {

public static final String PIPELINE_VERSION = "michigan-imputationserver-2.0.0-beta1";
public static final String PIPELINE_VERSION = "michigan-imputationserver-2.0.0";

public static final String IMPUTATION_VERSION = "minimac-v4.1.6";

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/genepi/imputationserver/util/RefPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

public class RefPanel {

public static final String ALLELE_SWITCHES = String.valueOf(Integer.MAX_VALUE);
public static final String STRAMD_FLIPS = "100";
public static final String SAMPLE_CALL_RATE = "0.5";
public static final String MIN_SNPS = "3";
Expand Down Expand Up @@ -57,6 +58,7 @@ public RefPanel() {
defaultQcFilter.put("sampleCallrate", SAMPLE_CALL_RATE);
defaultQcFilter.put("mixedGenotypeschrX", CHR_X_MIXED_GENOTYPES);
defaultQcFilter.put("strandFlips", STRAMD_FLIPS);
defaultQcFilter.put("alleleSwitches", ALLELE_SWITCHES);
}

public String getId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,47 @@ public void testQcStatisticsDontAllowStrandFlips() throws IOException {
"<b>Error:</b> More than -1 obvious strand flips have been detected. Please check strand. Imputation cannot be started!"));

}

public void testQcStatisticsAllowAlleleSwitches() throws IOException {

String configFolder = "test-data/configs/hapmap-3chr";
String inputFolder = "test-data/data/simulated-chip-3chr-imputation-switches";

// create workflow context
WorkflowTestContext context = buildContext(inputFolder, "hapmap2");

// create step instance
FastQualityControlMock qcStats = new FastQualityControlMock(configFolder);

// run and test
boolean result = run(context, qcStats);

// check statistics

assertTrue(context.hasInMemory("Excluded sites in total: 2,967"));
assertTrue(context.hasInMemory("Allele switch: 118,209"));
}

public void testQcStatisticsDontAllowAlleleSwitches() throws IOException {

String configFolder = "test-data/configs/hapmap-3chr";
String inputFolder = "test-data/data/simulated-chip-3chr-imputation-switches";

// create workflow context
WorkflowTestContext context = buildContext(inputFolder, "hapmap2-qcfilter-alleleswitches");

// create step instance
FastQualityControlMock qcStats = new FastQualityControlMock(configFolder);

// run and test
boolean result = run(context, qcStats);

// check statistics

assertTrue(context.hasInMemory("Excluded sites in total: 2,967"));
assertTrue(context.hasInMemory("Allele switch: 118,209"));
assertTrue(context.hasInMemory("<b>Error:</b> More than 33 allele switches have been detected. Imputation cannot be started!"));
}

public void testQcStatisticsFilterOverlap() throws IOException {

Expand Down
14 changes: 14 additions & 0 deletions test-data/configs/hapmap-3chr/panels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,18 @@ panels:
qcFilter:
sampleCallrate: 1.01
strandFlips: 100

- id: hapmap2-qcfilter-alleleswitches
hdfs: ref-panels/hapmap_r22.chr$chr.CEU.hg19.msav
legend: ref-panels/hapmap_r22.chr$chr.CEU.hg19_impute.legend.gz
mapEagle: ref-panels/genetic_map_hg19_chr1.txt
refEagle: ref-panels/hapmap_r22.eagle/hapmap_r22.chr$chr.CEU.hg19.recode.bcf
samples:
eur: 60
mixed: -1
populations:
eur: EUR
mixed: Mixed
qcFilter:
alleleSwitches: 33

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 65392ab

Please sign in to comment.