本文整理汇总了Java中htsjdk.variant.vcf.VCFFilterHeaderLine类的典型用法代码示例。如果您正苦于以下问题:Java VCFFilterHeaderLine类的具体用法?Java VCFFilterHeaderLine怎么用?Java VCFFilterHeaderLine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VCFFilterHeaderLine类属于htsjdk.variant.vcf包,在下文中一共展示了VCFFilterHeaderLine类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onTraversalStart
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
@Override
public void onTraversalStart() {
final VCFHeader inputHeader = getHeaderForVariants();
final Set<VCFHeaderLine> headerLines = new HashSet<>(inputHeader.getMetaDataInSortedOrder());
Mutect2FilteringEngine.M_2_FILTER_NAMES.stream().map(GATKVCFHeaderLines::getFilterLine).forEach(headerLines::add);
headerLines.add(new VCFFilterHeaderLine(Mutect2FilteringEngine.ARTIFACT_IN_NORMAL_FILTER_NAME, "artifact_in_normal"));
headerLines.add(new VCFFilterHeaderLine(Mutect2FilteringEngine.MEDIAN_BASE_QUALITY_DIFFERENCE_FILTER_NAME, "ref - alt median base quality"));
headerLines.add(new VCFFilterHeaderLine(Mutect2FilteringEngine.MEDIAN_MAPPING_QUALITY_DIFFERENCE_FILTER_NAME, "ref - alt median mapping quality"));
headerLines.add(new VCFFilterHeaderLine(Mutect2FilteringEngine.MEDIAN_CLIPPING_DIFFERENCE_FILTER_NAME, "ref - alt median clipping"));
headerLines.add(new VCFFilterHeaderLine(Mutect2FilteringEngine.MEDIAN_FRAGMENT_LENGTH_DIFFERENCE_FILTER_NAME, "abs(ref - alt) median fragment length"));
headerLines.add(new VCFFilterHeaderLine(Mutect2FilteringEngine.READ_POSITION_FILTER_NAME, "median distance of alt variants from end of reads"));
headerLines.add(new VCFFilterHeaderLine(Mutect2FilteringEngine.CONTAMINATION_FILTER_NAME, "contamination"));
headerLines.addAll(getDefaultToolVCFHeaderLines());
final VCFHeader vcfHeader = new VCFHeader(headerLines, inputHeader.getGenotypeSamples());
vcfWriter = createVCFWriter(new File(outputVcf));
vcfWriter.writeHeader(vcfHeader);
}
开发者ID:broadinstitute,项目名称:gatk-protected,代码行数:18,代码来源:FilterMutectCalls.java
示例2: addHeaders
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
/**
* Add header entries.
*
* @param header The {@link VCFHeader} to extend.
*/
public void addHeaders(VCFHeader header) {
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_DE_NOVO_PARENT_AD2,
"Supporting read count for alternative allele in tentative de novo call > "
+ options.getDeNovoMaxParentAd2()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_DE_NOVO_IN_SIBLING,
"Non-ref genotype also seen in sibling"));
header.addMetaDataLine(
new VCFFormatHeaderLine(FORMAT_GT_DE_NOVO, 1, VCFHeaderLineType.Character,
"Whether the variant looks de novo by genotype, one of {'Y', 'N'}."));
header.addMetaDataLine(
new VCFFormatHeaderLine(FORMAT_PARENTS_REF, 1, VCFHeaderLineType.Character,
"Whether both parent's genotype is reference, one of {'Y', 'N'}."));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_ONE_PARENT_FILTERED,
"One parent was filtered or no-call, filter child as well, important for inheritance "
+ "filtration as filtered variants count as no-call which counts as "
+ "wild-card by default; \"one/both parents filtered\" don't count. (enabled: "
+ options.isApplyParentGtFilteredFilters() + ")"));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_BOTH_PARENTS_FILTERED,
"Both parents are filtered or no-call, filter child as well, important for inheritance "
+ "filtration as filtered variants count as no-call which counts as "
+ "wild-card by default; \"one/both parents filtered\" don't count. (enabled: "
+ options.isApplyParentGtFilteredFilters() + ")"));
}
开发者ID:charite,项目名称:jannovar,代码行数:31,代码来源:PedigreeFilterHeaderExtender.java
示例3: getVCFHeaderInfo
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
public static Set<VCFHeaderLine> getVCFHeaderInfo() {
Set<VCFHeaderLine> headerInfo = new HashSet<VCFHeaderLine>();
headerInfo.add(new VCFFilterHeaderLine("REJECT", "Rejected as a confident somatic mutation"));
headerInfo.add(new VCFFilterHeaderLine("PASS", "Accept as a confident somatic mutation"));
// TODO: what fields do we need here
VCFStandardHeaderLines.addStandardInfoLines(headerInfo, true,
VCFConstants.MAPPING_QUALITY_ZERO_KEY,
VCFConstants.DBSNP_KEY,
VCFConstants.SOMATIC_KEY);
// TODO copy from TCGA spec..
headerInfo.add(new VCFInfoHeaderLine("VT", 1, VCFHeaderLineType.String, "Variant type, can be SNP, INS or DEL"));
VCFStandardHeaderLines.addStandardFormatLines(headerInfo, true,
VCFConstants.GENOTYPE_KEY,
VCFConstants.GENOTYPE_QUALITY_KEY,
VCFConstants.DEPTH_KEY,
VCFConstants.GENOTYPE_ALLELE_DEPTHS,
VCFConstants.GENOTYPE_PL_KEY);
// cancer-specific
// TODO: push to VCFConstants in GATK
headerInfo.add(new VCFFormatHeaderLine("FA", VCFHeaderLineCount.A, VCFHeaderLineType.Float, "Allele fraction of the alternate allele with regard to reference"));
headerInfo.add(new VCFFormatHeaderLine("SS", 1, VCFHeaderLineType.Integer, "Variant status relative to non-adjacent Normal,0=wildtype,1=germline,2=somatic,3=LOH,4=post-transcriptional modification,5=unknown"));
headerInfo.add(new VCFFormatHeaderLine(VCFConstants.RMS_BASE_QUALITY_KEY, VCFHeaderLineCount.A, VCFHeaderLineType.Float, "Average base quality for reads supporting alleles"));
return headerInfo;
}
开发者ID:PAA-NCIC,项目名称:SparkSeq,代码行数:33,代码来源:VCFGenerator.java
示例4: addHeaders
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
/**
* Add header entries.
*
* @param header
* The {@link VCFHeader} to extend.
*/
public void addHeaders(VCFHeader header) {
// add INFO line for standardized ANN field
header.addMetaDataLine(
new VCFInfoHeaderLine("ANN", 1, VCFHeaderLineType.String, Annotation.VCF_ANN_DESCRIPTION_STRING));
// add FILTER line for standardized OffExome filter
header.addMetaDataLine(
new VCFFilterHeaderLine(FILTER_EFFECT_OFF_EXOME, "Variant off-exome in all effect predictions"));
}
开发者ID:charite,项目名称:jannovar,代码行数:15,代码来源:VariantEffectHeaderExtender.java
示例5: addHeaders
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
/**
* Add header entries.
*
* @param header The {@link VCFHeader} to extend.
*/
public void addHeaders(VCFHeader header) {
if (!header.hasFormatLine("FT")) header.addMetaDataLine(new VCFFormatHeaderLine("FT", 1,
VCFHeaderLineType.String, "Filters applied to genotype call"));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MAX_COV,
"Genotype has coverage >" + options.getMaxCov()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MIN_COV_HET,
"Het. genotype call has coverage <" + options.getMinGtCovHet()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MIN_COV_HOM_ALT,
"Hom. alt genotype call has coverage <" + options.getMinGtCovHomAlt()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MIN_GQ,
"Genotype has quality (GQ) <" + options.getMinGtGq()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MIN_AAF_HET,
"Het. genotype has alternative allele fraction <" + options.getMinGtAafHet()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MAX_AAF_HET,
"Het. genotype has alternative allele fraction >" + options.getMaxGtAafHet()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MIN_AAF_HOM_ALT,
"Hom. alt genotype has alternative allele fraction <"
+ options.getMinGtAafHomAlt()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_GT_MAX_AAF_HOM_REF,
"Wild-type genotype has AAF >" + options.getMaxGtAafHomRef()));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_VAR_ALL_AFFECTED_GTS_FILTERED,
"The genotype calls of all affected individuals have been filtered for this variant."));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_VAR_MAX_FREQUENCY_AD,
"Variant frequency >" + options.getMaxAlleleFrequencyAd()
+ " (threshold for AD inheritance), variant will be annotated with "
+ "compatibility with dominant inheritance regardlessly"));
header.addMetaDataLine(new VCFFilterHeaderLine(FILTER_VAR_MAX_FREQUENCY_AR,
"Variant frequency >" + options.getMaxAlleleFrequencyAd()
+ " (threshold for AR inheritance), variant will not be considered for "
+ "composite recessive inheritance but for homozygous recessive inheritance "
+ "regardlessly"));
}
开发者ID:charite,项目名称:jannovar,代码行数:41,代码来源:ThresholdFilterHeaderExtender.java
示例6: openOutputFile
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
private VariantContextWriter openOutputFile() {
VariantContextWriterBuilder builder = new VariantContextWriterBuilder()
.setReferenceDictionary(fasta.getSequenceDictionary()).setOutputFile(options.getPathOutputVCF());
if (options.getPathOutputVCF().endsWith(".gz") || options.getPathOutputVCF().endsWith(".bcf"))
builder.setOption(Options.INDEX_ON_THE_FLY);
else
builder.unsetOption(Options.INDEX_ON_THE_FLY);
VariantContextWriter writer = builder.build();
VCFHeader header = new VCFHeader();
int i = 0;
for (SAMSequenceRecord record : fasta.getSequenceDictionary().getSequences()) {
Map<String, String> mapping = new TreeMap<String, String>();
mapping.put("ID", record.getSequenceName());
mapping.put("length", Integer.toString(record.getSequenceLength()));
header.addMetaDataLine(new VCFContigHeaderLine(mapping, i++));
}
header.addMetaDataLine(new VCFSimpleHeaderLine("ALT", "ERROR", "Error in conversion"));
header.addMetaDataLine(new VCFFilterHeaderLine("PARSE_ERROR",
"Problem in parsing original HGVS variant string, written out as variant at 1:g.1N>N"));
header.addMetaDataLine(new VCFInfoHeaderLine("ERROR_MESSAGE", 1, VCFHeaderLineType.String, "Error message"));
header.addMetaDataLine(new VCFInfoHeaderLine("ORIG_VAR", 1, VCFHeaderLineType.String,
"Original HGVS variant string from input file to hgvs-to-vcf"));
writer.writeHeader(header);
return writer;
}
开发者ID:charite,项目名称:jannovar,代码行数:30,代码来源:ProjectTranscriptToChromosome.java
示例7: writeHeader
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
@Override
public void writeHeader(final VCFHeader header) {
final Pedigree pedigree = Pedigree.newParser().parse(header);
if(pedigree.isEmpty()) {
throw new JvarkitException.PedigreeError("No pedigree found in header. use VcfInjectPedigree to add it");
}
if(!pedigree.verifyPersonsHaveUniqueNames()) {
throw new JvarkitException.PedigreeError("I can't use this pedigree in VCF because two samples have the same ID");
}
final Set<String> samplesNames= new HashSet<>(header.getSampleNamesInOrder());
this.individuals = new HashSet<>(pedigree.getPersons());
final Iterator<Pedigree.Person> iter= this.individuals.iterator();
while(iter.hasNext())
{
final Pedigree.Person person = iter.next();
if(!(samplesNames.contains(person.getId()))) {
LOG.warn("Ignoring "+person+" because not in VCF header or status is unknown");
iter.remove();
}
}
this.filter = new VCFFilterHeaderLine(
CtxWriterFactory.this.filterName,
"Will be set for variant where the only genotypes non-homref are NOT in the pedigree "
);
this.singletonFilter = new VCFFilterHeaderLine(
CtxWriterFactory.this.singletonfilterName,
"The ALT allele is found in less or equals than "+CtxWriterFactory.this.singleton+" individuals in the cases/controls"
);
final VCFHeader h2= new VCFHeader(header);
h2.addMetaDataLine(filter);
if(CtxWriterFactory.this.singleton!=IGNORE_SINGLETON) {
h2.addMetaDataLine(this.singletonFilter);
}
super.writeHeader(h2);
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:40,代码来源:VcfFilterNotInPedigree.java
示例8: writeHeader
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
@Override
public void writeHeader(final VCFHeader header) {
final File srcbedfile = this.tabixFile==null?this.treeMapFile:this.tabixFile;
this.vcfDict = header.getSequenceDictionary();
final VCFHeader h2=new VCFHeader(header);
this.infoHeader=
new VCFInfoHeaderLine(
this.infoName,
VCFHeaderLineCount.UNBOUNDED,
VCFHeaderLineType.String,
"metadata added from "+ srcbedfile+
" . Format was "+this.formatPattern
);
this.filterOverlap =
(this.filterOverlapStr==null || this.filterNoOverlapStr.trim().isEmpty()?null:
new VCFFilterHeaderLine(this.filterOverlapStr, "Variant overlap with "+srcbedfile)
);
this.filterNoOverlap =
(this.filterNoOverlapStr==null || this.filterNoOverlapStr.trim().isEmpty()?null:
new VCFFilterHeaderLine(this.filterNoOverlapStr, "Variant having NO overlap with "+srcbedfile)
);
if(this.filterOverlap!=null) h2.addMetaDataLine(this.filterOverlap);
if(this.filterNoOverlap!=null) h2.addMetaDataLine(this.filterNoOverlap);
h2.addMetaDataLine(this.infoHeader);
//addMetaData(h2);
super.writeHeader(h2);
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:32,代码来源:VCFBed.java
示例9: buildFilterHeaderTab
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
/** build a table describing the INFO column */
private Tab buildFilterHeaderTab(final VCFHeader header)
{
final TableView<VCFFilterHeaderLine> table=new TableView<>(FXCollections.observableArrayList(header.getFilterLines()));
table.getColumns().add(makeColumn("ID", F->F.getID()));
table.getColumns().add(makeColumn("Description", F->F.getDescription()));
final Tab tab=new Tab("FILTER",table);
tab.setClosable(false);
table.setPlaceholder(new Label("No FILTER defined."));
return tab;
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:13,代码来源:VcfStage.java
示例10: doVcfToVcf
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
@Override
protected int doVcfToVcf(String inputName, VcfIterator in, VariantContextWriter writer) {
final VCFHeader header= new VCFHeader(in.getHeader());
if(header.getInfoHeaderLine(this.winName)!=null) {
LOG.error("VCF header already contains the INFO header ID="+this.winName);
}
header.addMetaDataLine(new VCFInfoHeaderLine(
this.winName,
VCFHeaderLineCount.UNBOUNDED,
VCFHeaderLineType.String,
"Window : start|end|number-of-matching-variants|number-of-non-matching-variants"
));
if(this.filterName!=null && this.treshold>0)
{
if(header.getInfoHeaderLine(this.filterName)!=null) {
LOG.error("VCF header already contains the FORMAT header ID="+this.filterName);
}
header.addMetaDataLine(new VCFFilterHeaderLine(
this.filterName,
"Filter defined in "+getProgramName()
));
}
writer.writeHeader(header);
while(in.hasNext()) {
final VariantContext ctx = in.next();
mapVariant(writer,ctx);
}
flushVariants(writer,null);
return 0;
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:34,代码来源:VariantsInWindow.java
示例11: writeHeader
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
@Override
public void writeHeader(final VCFHeader header) {
final VCFHeader header2= new VCFHeader(header);
final String termlist = String.join(", ",CtxWriterFactory.this.user_terms.stream().
map(S->S.getAcn()+"("+S.getLabel()+")").
collect(Collectors.toSet()))
;
if(!CtxWriterFactory.this.filterIn.isEmpty()) {
header2.addMetaDataLine(new VCFFilterHeaderLine(CtxWriterFactory.this.filterIn,
"Variant having SO terms:"+ termlist));
}
if(!CtxWriterFactory.this.filterOut.isEmpty()) {
header2.addMetaDataLine(new VCFFilterHeaderLine(CtxWriterFactory.this.filterOut,
"Variant non having SO terms :" + termlist));
}
if(!StringUtil.isBlank(this.filterGenotypesStr) &&
!GT_FILTER_RESET_TO_NOCALL.equals(this.filterGenotypesStr))
{
header2.addMetaDataLine(new VCFFormatHeaderLine(
VCFConstants.GENOTYPE_FILTER_KEY,
1,VCFHeaderLineType.String,
"Genotype was filterered by vcffilterso : "+this.filterGenotypesStr
));
}
AbstractPredictionHandler ph = new VepPredictionHandler(header);
if(ph.isValid()) this.predictionHandlers.add(ph);
ph = new SnpEffPredictionHandler(header);
if(ph.isValid()) this.predictionHandlers.add(ph);
ph = new MyPredictionHandler(header);
if(ph.isValid()) this.predictionHandlers.add(ph);
ph = new AnnPredictionHandler(header);
if(ph.isValid()) this.predictionHandlers.add(ph);
super.writeHeader(header2);
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:39,代码来源:VcfFilterSequenceOntology.java
示例12: writeHeader
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
@Override
public void writeHeader(final VCFHeader header) {
final VCFHeader h2=new VCFHeader(header);
if(CtxWriterFactory.this.inGnomadFilterName!=null)
{
h2.addMetaDataLine(new VCFFilterHeaderLine(CtxWriterFactory.this.inGnomadFilterName,"Variant is in Gnomad"));
}
for(final InfoField infoField: this.infoFields)
{
h2.addMetaDataLine(infoField.makeVCFInfoHeaderLine());
}
super.writeHeader(h2);
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:15,代码来源:VcfGnomad.java
示例13: addMetaData
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
@Override
protected VCFHeader addMetaData(final VCFHeader header) {
if(!this.filterIn.isEmpty()) {
header.addMetaDataLine(new VCFFilterHeaderLine(this.filterIn,
"Variant overlapping database."));
}
if(!this.filterOut.isEmpty()) {
header.addMetaDataLine(new VCFFilterHeaderLine(this.filterOut,
"Variant non overlapping database."));
}
return super.addMetaData(header);
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:13,代码来源:VcfIn.java
示例14: renameVCFFilterHeaderLine
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
public static VCFFilterHeaderLine renameVCFFilterHeaderLine(VCFFilterHeaderLine h,String name)
{
return new VCFFilterHeaderLine(
name,
h.getValue()
);
}
开发者ID:lindenb,项目名称:jvarkit,代码行数:8,代码来源:VCFUtils.java
示例15: getFilterLine
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
public static VCFFilterHeaderLine getFilterLine(final String id) {
return filterLines.get(id);
}
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:4,代码来源:GaeaVCFHeaderLines.java
示例16: getAllFilterLines
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
public static Set<VCFFilterHeaderLine> getAllFilterLines() {
return Collections.unmodifiableSet(new HashSet<>(filterLines.values()));
}
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:4,代码来源:GaeaVCFHeaderLines.java
示例17: addFilterLine
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
private static void addFilterLine(final VCFFilterHeaderLine line) {
Utils.nonNull(line);
filterLines.put(line.getID(), line);
}
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:5,代码来源:GaeaVCFHeaderLines.java
示例18: addFilterLine
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
private static void addFilterLine(final VCFFilterHeaderLine line) {
filterLines.put(line.getID(), line);
}
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:4,代码来源:GaeaVcfHeaderLines.java
示例19: toHeaderLine
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
VCFFilterHeaderLine toHeaderLine() {
return new VCFFilterHeaderLine(Name, Description);
}
开发者ID:hartwigmedical,项目名称:hmftools,代码行数:4,代码来源:Filter.java
示例20: headerLines
import htsjdk.variant.vcf.VCFFilterHeaderLine; //导入依赖的package包/类
/** Return VCF header lines that define filters that may be applied by the VariantFilter. */
public List<VCFFilterHeaderLine> headerLines();
开发者ID:broadinstitute,项目名称:picard,代码行数:3,代码来源:VariantFilter.java
注:本文中的htsjdk.variant.vcf.VCFFilterHeaderLine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论