Skip to content

Commit

Permalink
Updated VF and BCF to incorporate #114
Browse files Browse the repository at this point in the history
  • Loading branch information
d-cameron committed May 21, 2018
1 parent 27cf165 commit 4505f08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>au.edu.wehi</groupId>
<artifactId>gridss</artifactId>
<packaging>jar</packaging>
<version>1.7.0-gridss</version>
<version>1.7.1-gridss-SNAPSHOT</version>
<name>gridss</name>
<url>https://github.com/PapenfussLab/gridss</url>
<properties>
Expand Down
19 changes: 16 additions & 3 deletions src/main/java/au/edu/wehi/idsv/StructuralVariationCallBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.stream.Stream;

import com.google.common.collect.ComparisonChain;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Ordering;
import com.google.common.collect.Range;
import com.google.common.collect.RangeSet;
Expand Down Expand Up @@ -277,17 +278,29 @@ public VariantContextDirectedEvidence make() {
.mapToInt(ass -> ass.getCategorySupportBreakdown().get(category) ? new AssemblyAttributes(ass.getSAMRecord()).getAssemblySupportCountReadPair(category) : 0)
.sum();
Set<String> bpfrags = supportingBreakpoint.stream()
.map(e -> e.getOriginatingFragmentID(category))
.map(e -> {
if (AssemblyAttributes.isAssembly(e)) {
SingleReadEvidence ass = (SingleReadEvidence)e;
return ass.getCategorySupportBreakdown().get(category) ? e.getOriginatingFragmentID(category) : ImmutableList.<String>of();
}
return e.getOriginatingFragmentID(category);
})
.flatMap(x -> x.stream())
.collect(Collectors.toSet());
supportingBreakpointFragments[category] = bpfrags.size();
Set<String> befrags = supportingBreakend.stream()
.map(e -> e.getOriginatingFragmentID(category))
.map(e -> {
if (AssemblyAttributes.isAssembly(e)) {
SingleReadEvidence ass = (SingleReadEvidence)e;
return ass.getCategorySupportBreakdown().get(category) ? e.getOriginatingFragmentID(category) : ImmutableList.<String>of();
}
return e.getOriginatingFragmentID(category);
})
.flatMap(x -> x.stream())
.collect(Collectors.toSet());
befrags.removeAll(bpfrags);
supportingBreakendFragments[category] = befrags.size();

genotypeBuilder.get(category).attribute(VcfFormatAttributes.BREAKPOINT_ASSEMBLY_READ_COUNT.attribute(), asr[category]);
genotypeBuilder.get(category).attribute(VcfFormatAttributes.BREAKPOINT_ASSEMBLY_READPAIR_COUNT.attribute(), asrp[category]);
genotypeBuilder.get(category).attribute(VcfFormatAttributes.BREAKEND_ASSEMBLY_READ_COUNT.attribute(), basr[category]);
Expand Down

0 comments on commit 4505f08

Please sign in to comment.