use of com.hartwig.hmftools.common.region.hmfslicer.HmfGenomeRegion in project hmftools by hartwigmedical.
the class GeneCopyNumberBuilderTest method setup.
@Before
public void setup() {
HmfGenomeRegion gene = create(1001, 10000);
victim = new GeneCopyNumberBuilder(gene);
}
use of com.hartwig.hmftools.common.region.hmfslicer.HmfGenomeRegion in project hmftools by hartwigmedical.
the class BachelorEligibility method processStructuralVariant.
private Collection<EligibilityReport> processStructuralVariant(final String patient, final GenomePosition position, final GenomePosition other, final StructuralVariantType svType) {
final List<EligibilityReport> results = Lists.newArrayList();
// TODO: can we do better than this performance wise? new map?
for (final HmfGenomeRegion region : allGenesByChromosomeMap.get(position.chromosome())) {
if (!region.contains(position)) {
continue;
}
// skip non-inversion intronic variants
if (region.contains(other) && svType != StructuralVariantType.INV) {
final int intronStart = intron(region.exome(), position);
final int intronEnd = intron(region.exome(), other);
// the variant is intronic in a gene -- we will filter it
if (intronStart >= 0 && intronStart == intronEnd) {
continue;
}
}
programs.stream().filter(p -> p.disruptionProcessor().test(region)).map(p -> ImmutableEligibilityReport.builder().patient(patient).source(SOMATIC_DISRUPTION).program(p.name()).id("").genes(region.gene()).chrom(region.chromosome()).pos(position.position()).ref("").alts("").effects("").build()).forEach(results::add);
}
return results;
}
Aggregations