functions for setting gentoype records and alternate bases; function for getting all rods implementing VCF
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2611 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
d2961a3a17
commit
41392f8ff5
|
|
@ -479,6 +479,12 @@ public class VCFRecord implements Variation, VariantBackedByGenotype {
|
||||||
mGenotypeRecords.add(mGenotypeRecord);
|
mGenotypeRecords.add(mGenotypeRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setGenotypeRecords(List<VCFGenotypeRecord> records) {
|
||||||
|
mGenotypeRecords.clear();
|
||||||
|
for ( VCFGenotypeRecord g : records )
|
||||||
|
addGenotypeRecord(g);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add an alternate base to our alternate base list. All bases are uppercased
|
* add an alternate base to our alternate base list. All bases are uppercased
|
||||||
* before being added to the list.
|
* before being added to the list.
|
||||||
|
|
@ -489,6 +495,12 @@ public class VCFRecord implements Variation, VariantBackedByGenotype {
|
||||||
if (!mAlts.contains(base)) mAlts.add(base);
|
if (!mAlts.contains(base)) mAlts.add(base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAlternateBases(List<VCFGenotypeEncoding> bases) {
|
||||||
|
mAlts.clear();
|
||||||
|
for ( VCFGenotypeEncoding e : bases )
|
||||||
|
addAlternateBase(e);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add an info field to the record
|
* add an info field to the record
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,18 @@ public class VCFUtils {
|
||||||
*/
|
*/
|
||||||
private VCFUtils() { }
|
private VCFUtils() { }
|
||||||
|
|
||||||
|
public static Set<ReferenceOrderedData> getRodVCFs(GenomeAnalysisEngine toolkit) {
|
||||||
|
Set<ReferenceOrderedData> vcfs = new HashSet<ReferenceOrderedData>();
|
||||||
|
|
||||||
|
for ( ReferenceOrderedDataSource source : toolkit.getRodDataSources() ) {
|
||||||
|
ReferenceOrderedData rod = source.getReferenceOrderedData();
|
||||||
|
if ( rod.getType().equals(RodVCF.class) ) {
|
||||||
|
vcfs.add(rod);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vcfs;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the header fields from all VCF rods input by the user
|
* Gets the header fields from all VCF rods input by the user
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue