Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ private void beadStudioImportTest()

Ext4FieldRef.getForLabel(this, "Run Description").setValue("Description");

waitForElement(Ext4Helper.Locators.ext4Button("Download Example Data"));
File exampleData = clickAndWaitForDownload(Ext4Helper.Locators.ext4Button("Download Example Data"));

waitAndClick(Ext4Helper.Locators.radiobutton(this, "File Upload"));
Expand Down
3 changes: 2 additions & 1 deletion SivStudies/resources/data/reports.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ query Clinical study hematologyPivot CBC/Hematology
query Study Design study assignment Project/Study Assignment
query Research study flow Flow Cytometry
query Research study outcomes Study Outcomes/Phenotypes
query Research study genetics Genetic Data / MHC
query Research study pvl_outcomes Study PVL-Based Outcomes
query Research study genetics Genetic Data / MHC
query Clinical study procedures Procedures
query Research study viralLoads Viral Loads
query General study samples Samples
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="duplicateInfectionDates" tableDbType="NOT_IN_DB">
<tableTitle>Duplicate Infection Dates</tableTitle>
<columns>

</columns>
</table>
</tables>
</metadata>
</query>
10 changes: 10 additions & 0 deletions SivStudies/resources/queries/study/duplicateInfectionDates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SELECT
t.Id,
t.date,
'SIV Infection' as category

FROM study.treatments t
WHERE t.category = 'SIV Infection'

GROUP BY t.Id, t.date
HAVING count(*) > 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="infectionAnchorDateDiscordance" tableDbType="NOT_IN_DB">
<tableTitle>Discordant Infection Dates</tableTitle>
<columns>
<column columnName="treatmentTableDate">
<columnTitle>Date (Treatments Table)</columnTitle>
</column>
<column columnName="subjectAnchorDatesTableDate">
<columnTitle>Date (Anchor Dates Table)</columnTitle>
</column>
</columns>
</table>
</tables>
</metadata>
</query>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SELECT
t.Id,
'SIV Infection' as category,
t.date as treatmentTableDate,
t2.date as subjectAnchorDatesTableDate

FROM study.treatments t
FULL JOIN studies.subjectAnchorDates t2 ON (
t2.subjectId = t.Id AND
t2.eventLabel = 'SIV Infection'
)

WHERE t.category = 'SIV Infection' AND t2.date != t.date
30 changes: 30 additions & 0 deletions SivStudies/resources/queries/study/pvl_outcomes.query.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="pvl_outcomes" tableDbType="TABLE" useColumnOrder="true">
<columns>
<column columnName="Id"/>
<column columnName="date">
<columnTitle>Date</columnTitle>
<formatString>Date</formatString>
</column>
<column columnName="outcome">
<columnTitle>Outcome/Phenotype</columnTitle>
</column>
<column columnName="numeric_value">
<columnTitle>Numeric Value</columnTitle>
</column>
<column columnName="string_value">
<columnTitle>String Value</columnTitle>
</column>
<column columnName="comments">
<columnTitle>Comments</columnTitle>
</column>
<column columnName="dataSource">
<columnTitle>Data Source</columnTitle>
</column>
</columns>
</table>
</tables>
</metadata>
</query>
15 changes: 15 additions & 0 deletions SivStudies/resources/queries/study/pvl_outcomes/.qview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView" hidden="false" canOverride="false">
<columns>
<column name="Id"/>
<column name="date"/>
<column name="outcome"/>
<column name="numeric_value"/>
<column name="string_value"/>
<column name="comments"/>
<column name="dataSource"/>
</columns>
<sorts>
<sort column="Id" descending="false"/>
<sort column="outcome" descending="true"/>
</sorts>
</customView>
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@
<dataset name="outcomes" showByDefault="true" category="Research" type="Standard" id="15">
<tags/>
</dataset>
<dataset name="pvl_outcomes" showByDefault="true" category="Research" type="Standard" id="16">
<tags/>
</dataset>
</datasets>
</datasets>
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,36 @@
</columns>
<tableTitle>Outcomes/Phenotypes</tableTitle>
</table>
<table tableName="pvl_outcomes" tableDbType="TABLE">
<columns>
<column columnName="Id">
<datatype>varchar</datatype>
<conceptURI>http://cpas.labkey.com/Study#ParticipantId</conceptURI>
</column>
<column columnName="date">
<datatype>timestamp</datatype>
<conceptURI>http://cpas.labkey.com/laboratory#sampleDate</conceptURI>
</column>
<column columnName="dataSource">
<datatype>varchar</datatype>
</column>
<column columnName="objectId">
<datatype>entityid</datatype>
<isKeyField>true</isKeyField>
</column>
<column columnName="outcome">
<datatype>varchar</datatype>
</column>
<column columnName="numeric_value">
<datatype>double</datatype>
</column>
<column columnName="string_value">
<datatype>varchar</datatype>
</column>
<column columnName="comments">
<datatype>varchar</datatype>
</column>
</columns>
<tableTitle>PVL Outcomes</tableTitle>
</table>
</tables>
14 changes: 14 additions & 0 deletions mGAP/src/org/labkey/mgap/pipeline/AnnotationStep.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.labkey.mgap.pipeline;

import htsjdk.samtools.util.Interval;
import htsjdk.samtools.util.SequenceUtil;
import htsjdk.variant.vcf.VCFFileReader;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;
Expand All @@ -27,6 +28,7 @@
import org.labkey.api.sequenceanalysis.pipeline.PipelineStepProvider;
import org.labkey.api.sequenceanalysis.pipeline.ReferenceGenome;
import org.labkey.api.sequenceanalysis.pipeline.SequenceAnalysisJobSupport;
import org.labkey.api.sequenceanalysis.pipeline.SequencePipelineService;
import org.labkey.api.sequenceanalysis.pipeline.ToolParameterDescriptor;
import org.labkey.api.sequenceanalysis.pipeline.VariantProcessingStep;
import org.labkey.api.sequenceanalysis.pipeline.VariantProcessingStepOutputImpl;
Expand Down Expand Up @@ -330,6 +332,18 @@ public Output processVariants(File inputVCF, File outputDirectory, ReferenceGeno
{
LiftoverBcfToolsWrapper liftoverVcfRunner = new LiftoverBcfToolsWrapper(getPipelineCtx().getLogger());
liftoverVcfRunner.doLiftover(currentVcf, chainFile, genome.getWorkingFastaFile(), grch37Genome.getWorkingFastaFile(), liftoverRejects, liftedToGRCh37);

try
{
// NOTE: the resulting VCF is not necessarily in chromosome sort order:
SequencePipelineService.get().sortROD(liftedToGRCh37, getPipelineCtx().getLogger(), 2);

SequenceAnalysisService.get().ensureVcfIndex(liftedToGRCh37, getPipelineCtx().getLogger());
}
catch (IOException e)
{
throw new PipelineJobException(e);
}
}
else
{
Expand Down