Moved sample package from DataSources to gatk, and renamed it samples
-- All associated changes to the codebase are just header updates
This commit is contained in:
parent
e197dcd1f3
commit
e76f381628
|
|
@ -34,15 +34,14 @@ import org.broadinstitute.sting.gatk.arguments.ValidationExclusion;
|
|||
import org.broadinstitute.sting.gatk.datasources.reads.*;
|
||||
import org.broadinstitute.sting.gatk.datasources.reference.ReferenceDataSource;
|
||||
import org.broadinstitute.sting.gatk.datasources.rmd.ReferenceOrderedDataSource;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.executive.MicroScheduler;
|
||||
import org.broadinstitute.sting.gatk.filters.FilterManager;
|
||||
import org.broadinstitute.sting.gatk.filters.ReadFilter;
|
||||
import org.broadinstitute.sting.gatk.filters.ReadGroupBlackListFilter;
|
||||
import org.broadinstitute.sting.gatk.io.OutputTracker;
|
||||
import org.broadinstitute.sting.gatk.io.stubs.Stub;
|
||||
import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
|
||||
import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder;
|
||||
import org.broadinstitute.sting.gatk.refdata.utils.RMDIntervalGenerator;
|
||||
import org.broadinstitute.sting.gatk.refdata.utils.RMDTriplet;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
package org.broadinstitute.sting.gatk.contexts;
|
||||
|
||||
import net.sf.samtools.SAMReadGroupRecord;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import net.sf.picard.util.PeekableIterator;
|
|||
import org.broadinstitute.sting.gatk.ReadProperties;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.datasources.reads.Shard;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.samples.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.iterators.LocusIterator;
|
||||
import org.broadinstitute.sting.gatk.iterators.LocusIteratorByState;
|
||||
import org.broadinstitute.sting.gatk.iterators.StingSAMIterator;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ import org.broadinstitute.sting.gatk.DownsampleType;
|
|||
import org.broadinstitute.sting.gatk.DownsamplingMethod;
|
||||
import org.broadinstitute.sting.gatk.ReadProperties;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.SampleDataSource;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
import org.broadinstitute.sting.utils.MathUtils;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
package org.broadinstitute.sting.gatk.datasources.sample;
|
||||
package org.broadinstitute.sting.gatk.samples;
|
||||
|
||||
|
||||
import org.broadinstitute.sting.utils.exceptions.StingException;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.broadinstitute.sting.gatk.datasources.sample;
|
||||
package org.broadinstitute.sting.gatk.samples;
|
||||
|
||||
import net.sf.samtools.SAMFileHeader;
|
||||
import net.sf.samtools.SAMReadGroupRecord;
|
||||
|
|
@ -7,14 +7,8 @@ import org.broadinstitute.sting.utils.SampleUtils;
|
|||
import org.broadinstitute.sting.utils.exceptions.StingException;
|
||||
import org.broadinstitute.sting.utils.variantcontext.Genotype;
|
||||
import org.broadinstitute.sting.utils.variantcontext.VariantContext;
|
||||
import org.yaml.snakeyaml.TypeDescription;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.Constructor;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -30,7 +30,7 @@ import org.broadinstitute.sting.commandline.Output;
|
|||
import org.broadinstitute.sting.gatk.arguments.StandardVariantContextInputArgumentCollection;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.gatk.filters.MappingQualityZeroFilter;
|
||||
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||
import org.broadinstitute.sting.gatk.walkers.*;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package org.broadinstitute.sting.gatk.walkers.qc;
|
||||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.gatk.walkers.LocusWalker;
|
||||
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Extends locus walker to print how many reads there are at each locus, by population
|
||||
*/
|
||||
public class CountLociByPopulationWalker extends LocusWalker<Integer, Long> implements TreeReducible<Long> {
|
||||
public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
|
||||
|
||||
// in this HashMap, we'll keep count of how many
|
||||
HashMap<String, Integer> count = new HashMap<String, Integer>();
|
||||
|
||||
ArrayList<SAMRecord> reads = (ArrayList) context.getBasePileup().getReads();
|
||||
|
||||
for (SAMRecord read : reads) {
|
||||
|
||||
// get the sample
|
||||
Sample sample = getToolkit().getSampleByRead(read);
|
||||
if (sample == null)
|
||||
return 1;
|
||||
|
||||
if (!count.containsKey(sample.getPopulation())) {
|
||||
count.put(sample.getPopulation(), 1);
|
||||
}
|
||||
count.put(sample.getPopulation(), count.get(sample.getPopulation()) + 1);
|
||||
}
|
||||
|
||||
System.out.println("\n\n\n***** LOCUS: " + ref.getLocus().toString() + " *****");
|
||||
for (String population : count.keySet()) {
|
||||
System.out.println(String.format("%s | %d", population, count.get(population)));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public Long reduceInit() { return 0l; }
|
||||
|
||||
public Long reduce(Integer value, Long sum) {
|
||||
return value + sum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduces two subtrees together. In this case, the implementation of the tree reduce
|
||||
* is exactly the same as the implementation of the single reduce.
|
||||
*/
|
||||
public Long treeReduce(Long lhs, Long rhs) {
|
||||
return lhs + rhs;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.broadinstitute.sting.gatk.walkers.qc;
|
||||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.gatk.walkers.DataSource;
|
||||
import org.broadinstitute.sting.gatk.walkers.ReadWalker;
|
||||
import org.broadinstitute.sting.gatk.walkers.Requires;
|
||||
|
||||
/**
|
||||
* Walks over the input data set, calculating the number of reads seen for diagnostic purposes.
|
||||
* Can also count the number of reads matching a given criterion using read filters (see the
|
||||
* --read-filter command line argument). Simplest example of a read-backed analysis.
|
||||
*/
|
||||
@Requires({DataSource.READS, DataSource.REFERENCE})
|
||||
public class CountMalesWalker extends ReadWalker<Integer, Integer> {
|
||||
public Integer map(ReferenceContext ref, SAMRecord read, ReadMetaDataTracker tracker) {
|
||||
Sample sample = getToolkit().getSampleByRead(read);
|
||||
return sample.isMale() ? 1 : 0;
|
||||
}
|
||||
|
||||
public Integer reduceInit() { return 0; }
|
||||
|
||||
public Integer reduce(Integer value, Integer sum) {
|
||||
return value + sum;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
package org.broadinstitute.sting.utils;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
import org.broadinstitute.sting.utils.variantcontext.Genotype;
|
||||
import org.broadinstitute.sting.utils.variantcontext.VariantContext;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,254 @@
|
|||
/*
|
||||
* Copyright (c) 2011, The Broad Institute
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.broadinstitute.sting.utils.ped;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.SampleDataSource;
|
||||
import org.broadinstitute.sting.utils.MathUtils;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
import org.broadinstitute.sting.utils.text.XReadLines;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Reads PED file-formatted tabular text files
|
||||
*
|
||||
* See http://www.broadinstitute.org/mpg/tagger/faq.html
|
||||
* See http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#ped
|
||||
*
|
||||
* The "ped" file format refers to the widely-used format for linkage pedigree data.
|
||||
* Each line describes a single (diploid) individual in the following format:
|
||||
*
|
||||
* family_ID individual_ID father_ID mother_ID gender phenotype genotype_1 genotype_2 ...
|
||||
*
|
||||
* If your data lacks pedigree information (for example, unrelated case/control individuals),
|
||||
* set the father_ID and mother_ID to 0. sex denotes the individual's gender with 1=male and 2=female.
|
||||
* phenotype refers to the affected status (for association studies) where 0=unknown, 1=unaffected, 2=affected.
|
||||
* Finally, each genotype is written as two (=diploid) integer numbers (separated by whitespace),
|
||||
* where 1=A, 2=C, 3=G, 4=T. No header lines are allowed and all columns must be separated by whitespace.
|
||||
* Check out the information at the PLINK website on the "ped" file format.
|
||||
*
|
||||
* The PED file is a white-space (space or tab) delimited file: the first six columns are mandatory:
|
||||
* Family ID
|
||||
* Individual ID
|
||||
* Paternal ID
|
||||
* Maternal ID
|
||||
* Sex (1=male; 2=female; other=unknown)
|
||||
* Phenotype
|
||||
*
|
||||
* The IDs are alphanumeric: the combination of family and individual ID should uniquely identify a person.
|
||||
* A PED file must have 1 and only 1 phenotype in the sixth column. The phenotype can be either a
|
||||
* quantitative trait or an affection status column: PLINK will automatically detect which type
|
||||
* (i.e. based on whether a value other than 0, 1, 2 or the missing genotype code is observed).
|
||||
*
|
||||
* NOTE Quantitative traits with decimal points must be coded with a period/full-stop character and
|
||||
* not a comma, i.e. 2.394 not 2,394
|
||||
*
|
||||
* If an individual's sex is unknown, then any character other than 1 or 2 can be used.
|
||||
* When new files are created (PED, FAM, or other which contain sex) then the original coding will be
|
||||
* preserved. However, these individuals will be dropped from any analyses (i.e. phenotype set to missing also)
|
||||
* and an error message will arise if an analysis that uses family information is requested and an
|
||||
* individual of 'unknown' sex is specified as a father or mother.
|
||||
*
|
||||
*
|
||||
* HINT You can add a comment to a PED or MAP file by starting the line with a # character. The rest of that
|
||||
* line will be ignored. Do not start any family IDs with this character therefore.
|
||||
*
|
||||
* Affection status, by default, should be coded:
|
||||
* -9 missing
|
||||
* 0 missing
|
||||
* 1 unaffected
|
||||
* 2 affected
|
||||
*
|
||||
* If your file is coded 0/1 to represent unaffected/affected, then use the --1 flag:
|
||||
* plink --file mydata --1 which will specify a disease phenotype coded:
|
||||
*
|
||||
* -9 missing
|
||||
* 0 unaffected
|
||||
* 1 affected
|
||||
*
|
||||
* The missing phenotype value for quantitative traits is, by default, -9 (this can also be used for
|
||||
* disease traits as well as 0). It can be reset by including the --missing-phenotype option:
|
||||
*
|
||||
* Genotypes (column 7 onwards) should also be white-space delimited; they can be any character
|
||||
* (e.g. 1,2,3,4 or A,C,G,T or anything else) except 0 which is, by default, the missing genotype
|
||||
* character. All markers should be biallelic. All SNPs (whether haploid or not) must have two
|
||||
* alleles specified. Either Both alleles should be missing (i.e. 0) or neither.
|
||||
*
|
||||
* No header row should be given. For example, here are two individuals typed for 3 SNPs (one row = one person):
|
||||
*
|
||||
* FAM001 1 0 0 1 2 A A G G A C
|
||||
* FAM001 2 0 0 1 2 A A A G 0 0
|
||||
* ...
|
||||
*
|
||||
* Note that the GATK does not support genotypes in a PED file.
|
||||
*
|
||||
* @author Mark DePristo
|
||||
* @since 2011
|
||||
*/
|
||||
public class PedReader {
|
||||
private static Logger logger = Logger.getLogger(PedReader.class);
|
||||
final static private Set<String> CATAGORICAL_TRAIT_VALUES = new HashSet<String>(Arrays.asList("-9", "0", "1", "2"));
|
||||
final static private String commentMarker = "#";
|
||||
|
||||
private final File source;
|
||||
private final List<PedRecord> records;
|
||||
|
||||
|
||||
public enum MissingPedFields {
|
||||
NO_FAMILY_ID,
|
||||
NO_PARENTS,
|
||||
NO_SEX,
|
||||
NO_PHENOTYPE
|
||||
}
|
||||
|
||||
// phenotype
|
||||
private final static String PHENOTYPE_MISSING_VALUE = "-9";
|
||||
private final static String PHENOTYPE_MISSING_VALUE_SECONDARY = "0";
|
||||
private final static String PHENOTYPE_UNAFFECTED = "1";
|
||||
private final static String PHENOTYPE_AFFECTED = "2";
|
||||
|
||||
// Sex
|
||||
private final static String SEX_MALE = "1";
|
||||
private final static String SEX_FEMALE = "2";
|
||||
// other=unknown
|
||||
|
||||
public PedReader(File source, EnumSet<MissingPedFields> missingFields) throws FileNotFoundException {
|
||||
this.source = source;
|
||||
List<String> lines = new XReadLines(source).readLines();
|
||||
this.records = parsePedLines(lines, missingFields);
|
||||
}
|
||||
|
||||
private final List<PedRecord> parsePedLines(final List<String> lines, EnumSet<MissingPedFields> missingFields) {
|
||||
logger.info("Reading PED file " + source + " with missing fields: " + missingFields);
|
||||
|
||||
// What are the record offsets?
|
||||
final int familyPos = missingFields.contains(MissingPedFields.NO_FAMILY_ID) ? -1 : 0;
|
||||
final int samplePos = familyPos + 1;
|
||||
final int paternalPos = missingFields.contains(MissingPedFields.NO_PARENTS) ? -1 : samplePos + 1;
|
||||
final int maternalPos = missingFields.contains(MissingPedFields.NO_PARENTS) ? -1 : paternalPos + 1;
|
||||
final int sexPos = missingFields.contains(MissingPedFields.NO_SEX) ? -1 : Math.max(maternalPos, samplePos) + 1;
|
||||
final int phenotypePos = missingFields.contains(MissingPedFields.NO_PHENOTYPE) ? -1 : Math.max(sexPos, Math.max(maternalPos, samplePos)) + 1;
|
||||
final int nExpectedFields = MathUtils.arrayMaxInt(Arrays.asList(samplePos, paternalPos, maternalPos, sexPos, phenotypePos));
|
||||
|
||||
// go through once and determine properties
|
||||
int lineNo = 1;
|
||||
boolean isQT = false;
|
||||
final List<String[]> splits = new ArrayList<String[]>(lines.size());
|
||||
for ( final String line : lines ) {
|
||||
if ( line.startsWith(commentMarker)) continue;
|
||||
String[] parts = line.split("\\W+");
|
||||
|
||||
if ( parts.length != nExpectedFields )
|
||||
throw new UserException.MalformedFile(source, "Bad PED line " + lineNo + ": wrong number of fields");
|
||||
|
||||
if ( phenotypePos != -1 ) {
|
||||
isQT = isQT || CATAGORICAL_TRAIT_VALUES.contains(parts[phenotypePos]);
|
||||
}
|
||||
|
||||
splits.add(parts);
|
||||
lineNo++;
|
||||
}
|
||||
logger.info("Trait is quantitative? " + isQT);
|
||||
|
||||
// now go through and parse each record
|
||||
lineNo = 1;
|
||||
final List<PedRecord> recs = new ArrayList<PedRecord>(splits.size());
|
||||
for ( final String[] parts : splits ) {
|
||||
String familyID = null, individualID, paternalID = null, maternalID = null;
|
||||
Sample.Gender sex = Sample.Gender.UNKNOWN;
|
||||
double quantitativePhenotype = Sample.UNSET_QUANTITIATIVE_TRAIT_VALUE;
|
||||
Sample.Affection affection = Sample.Affection.UNKNOWN;
|
||||
|
||||
if ( familyPos != -1 ) familyID = parts[familyPos];
|
||||
individualID = parts[samplePos];
|
||||
if ( paternalPos != -1 ) paternalID = parts[paternalPos];
|
||||
if ( maternalPos != -1 ) maternalID = parts[maternalPos];
|
||||
|
||||
if ( sexPos != -1 ) {
|
||||
if ( parts[sexPos].equals(SEX_MALE) ) sex = Sample.Gender.MALE;
|
||||
else if ( parts[sexPos].equals(SEX_FEMALE) ) sex = Sample.Gender.FEMALE;
|
||||
else sex = Sample.Gender.UNKNOWN;
|
||||
}
|
||||
|
||||
if ( phenotypePos != -1 ) {
|
||||
if ( isQT ) {
|
||||
if ( parts[phenotypePos].equals(PHENOTYPE_MISSING_VALUE) )
|
||||
affection = Sample.Affection.UNKNOWN;
|
||||
else {
|
||||
affection = Sample.Affection.QUANTITATIVE;
|
||||
quantitativePhenotype = Double.valueOf(parts[phenotypePos]);
|
||||
}
|
||||
} else {
|
||||
if ( parts[phenotypePos].equals(PHENOTYPE_MISSING_VALUE) ) affection = Sample.Affection.UNKNOWN;
|
||||
else if ( parts[phenotypePos].equals(PHENOTYPE_MISSING_VALUE_SECONDARY) ) affection = Sample.Affection.UNKNOWN;
|
||||
else if ( parts[phenotypePos].equals(PHENOTYPE_UNAFFECTED) ) affection = Sample.Affection.UNAFFECTED;
|
||||
else if ( parts[phenotypePos].equals(PHENOTYPE_AFFECTED) ) affection = Sample.Affection.AFFECTED;
|
||||
else throw new ReviewedStingException("Unexpected phenotype type " + parts[phenotypePos] + " at line " + lineNo);
|
||||
}
|
||||
}
|
||||
|
||||
recs.add(new PedRecord(familyID, individualID, paternalID, maternalID, sex, quantitativePhenotype, affection));
|
||||
|
||||
lineNo++;
|
||||
}
|
||||
|
||||
return Collections.unmodifiableList(recs);
|
||||
}
|
||||
|
||||
public List<PedRecord> getRecords() {
|
||||
return records;
|
||||
}
|
||||
|
||||
public void fillSampleDB(SampleDataSource db) {
|
||||
for ( final PedRecord rec : getRecords() ) {
|
||||
Sample s = db.getOrCreateSample(rec.individualID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PedRecord {
|
||||
final String familyID, individualID, paternalID, maternalID;
|
||||
final Sample.Gender sex;
|
||||
final double quantitativePhenotype;
|
||||
final Sample.Affection affection;
|
||||
|
||||
PedRecord(final String familyID, final String individualID,
|
||||
final String paternalID, final String maternalID,
|
||||
final Sample.Gender sex,
|
||||
final double quantitativePhenotype, final Sample.Affection affection) {
|
||||
this.familyID = familyID;
|
||||
this.individualID = individualID;
|
||||
this.paternalID = paternalID;
|
||||
this.maternalID = maternalID;
|
||||
this.sex = sex;
|
||||
this.quantitativePhenotype = quantitativePhenotype;
|
||||
this.affection = affection;
|
||||
}
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ package org.broadinstitute.sting.utils.pileup;
|
|||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.BaseUtils;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
package org.broadinstitute.sting.utils.pileup;
|
||||
|
||||
import net.sf.picard.util.PeekableIterator;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package org.broadinstitute.sting.utils.pileup;
|
||||
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
package org.broadinstitute.sting.utils.pileup;
|
||||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.collections.Pair;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
package org.broadinstitute.sting.utils.pileup;
|
||||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.collections.Pair;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
package org.broadinstitute.sting.utils.pileup;
|
||||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.HasGenomeLocation;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
package org.broadinstitute.sting.utils.pileup;
|
||||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -8,11 +8,10 @@ import org.broadinstitute.sting.gatk.datasources.reads.MockLocusShard;
|
|||
import org.broadinstitute.sting.gatk.datasources.reads.SAMReaderID;
|
||||
import org.broadinstitute.sting.gatk.datasources.reads.Shard;
|
||||
import org.broadinstitute.sting.gatk.executive.WindowMaker;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.samples.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.datasources.reads.LocusShard;
|
||||
import org.broadinstitute.sting.gatk.datasources.reads.SAMDataSource;
|
||||
import org.broadinstitute.sting.gatk.iterators.StingSAMIterator;
|
||||
import org.broadinstitute.sting.gatk.iterators.LocusIteratorByState;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ package org.broadinstitute.sting.gatk.datasources.reads;
|
|||
|
||||
import com.google.caliper.Param;
|
||||
import net.sf.picard.filter.FilteringIterator;
|
||||
import net.sf.picard.filter.SamRecordFilter;
|
||||
import net.sf.samtools.SAMFileReader;
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.broadinstitute.sting.commandline.Tags;
|
||||
|
|
@ -34,15 +33,13 @@ import org.broadinstitute.sting.gatk.DownsamplingMethod;
|
|||
import org.broadinstitute.sting.gatk.ReadProperties;
|
||||
import org.broadinstitute.sting.gatk.arguments.GATKArgumentCollection;
|
||||
import org.broadinstitute.sting.gatk.arguments.ValidationExclusion;
|
||||
import org.broadinstitute.sting.gatk.datasources.reads.SAMReaderID;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.samples.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.filters.ReadFilter;
|
||||
import org.broadinstitute.sting.gatk.filters.UnmappedReadFilter;
|
||||
import org.broadinstitute.sting.gatk.iterators.LocusIteratorByState;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
import org.broadinstitute.sting.utils.baq.BAQ;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package org.broadinstitute.sting.gatk.iterators;
|
||||
|
||||
import net.sf.picard.filter.SamRecordFilter;
|
||||
import net.sf.samtools.SAMFileHeader;
|
||||
import net.sf.samtools.SAMFileReader;
|
||||
import net.sf.samtools.SAMRecord;
|
||||
|
|
@ -12,7 +11,7 @@ import org.testng.Assert;
|
|||
import org.broadinstitute.sting.BaseTest;
|
||||
import org.broadinstitute.sting.gatk.ReadProperties;
|
||||
import org.broadinstitute.sting.gatk.arguments.ValidationExclusion;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.samples.SampleDataSource;
|
||||
import org.broadinstitute.sting.gatk.datasources.reads.SAMReaderID;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package org.broadinstitute.sting.gatk.datasources.sample;
|
||||
package org.broadinstitute.sting.gatk.samples;
|
||||
|
||||
import net.sf.samtools.SAMFileHeader;
|
||||
import org.broadinstitute.sting.utils.variantcontext.Allele;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.broadinstitute.sting.gatk.datasources.sample;
|
||||
package org.broadinstitute.sting.gatk.samples;
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.broadinstitute.sting.BaseTest;
|
||||
|
|
@ -28,7 +28,7 @@ import net.sf.samtools.SAMFileHeader;
|
|||
import net.sf.samtools.SAMReadGroupRecord;
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.testng.Assert;
|
||||
import org.broadinstitute.sting.gatk.datasources.sample.Sample;
|
||||
import org.broadinstitute.sting.gatk.samples.Sample;
|
||||
import org.broadinstitute.sting.utils.sam.ArtificialSAMUtils;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
|
|
|
|||
Loading…
Reference in New Issue