本文整理汇总了Java中htsjdk.variant.vcf.VCFFormatHeaderLine类的典型用法代码示例。如果您正苦于以下问题:Java VCFFormatHeaderLine类的具体用法?Java VCFFormatHeaderLine怎么用?Java VCFFormatHeaderLine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VCFFormatHeaderLine类属于htsjdk.variant.vcf包,在下文中一共展示了VCFFormatHeaderLine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
@Override
public void initialize(final AnnotatorCompatible walker, final GenomeLocParser parser, final Set<VCFHeaderLine> headerLines) {
boolean hasSBBSannotation = false;
for (final VCFHeaderLine line : headerLines) {
if (line instanceof VCFFormatHeaderLine) {
final VCFFormatHeaderLine formatline = (VCFFormatHeaderLine) line;
if (formatline.getID().equals(StrandBiasBySample.STRAND_BIAS_BY_SAMPLE_KEY_NAME)) {
hasSBBSannotation = true;
break;
}
}
}
if (hasSBBSannotation) {
logger.info("StrandBiasBySample annotation exists in input VCF header. Attempting to use StrandBiasBySample " +
"values to calculate strand bias annotation values. If no sample has the SB genotype annotation, annotation may still fail.");
return;
}
}
示例2: addHeaders
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的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() + ")"));
}
示例3: renameVCFFormatHeaderLine
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
public static VCFFormatHeaderLine renameVCFFormatHeaderLine(VCFFormatHeaderLine h,String name)
{
if(h.getCountType()==VCFHeaderLineCount.INTEGER)
{
return new VCFFormatHeaderLine(
name,
h.getCount(),
h.getType(),
h.getDescription()
);
}
else
{
return new VCFFormatHeaderLine(
name,
h.getCountType(),
h.getType(),
h.getDescription()
);
}
}
示例4: getVCFHeaderInfo
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的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;
}
示例5: generateOutputHeader
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
@NotNull
static VCFHeader generateOutputHeader(@NotNull final VCFHeader header, @NotNull final String sampleName) {
final VCFHeader outputVCFHeader = new VCFHeader(header.getMetaDataInInputOrder(), Sets.newHashSet(sampleName));
outputVCFHeader.addMetaDataLine(
new VCFFormatHeaderLine(VCFConstants.GENOTYPE_ALLELE_DEPTHS, VCFHeaderLineCount.R, VCFHeaderLineType.Integer,
"Allelic depths for the ref and alt alleles in the order listed"));
outputVCFHeader.addMetaDataLine(new VCFFormatHeaderLine(VCFConstants.GENOTYPE_KEY, 1, VCFHeaderLineType.String, "Genotype"));
outputVCFHeader.addMetaDataLine(
new VCFHeaderLine("StrelkaGATKCompatibility", "Added GT fields to strelka calls for gatk compatibility."));
return outputVCFHeader;
}
示例6: addHeaders
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的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"));
}
示例7: buildFormatHeaderTab
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
/** build a table describing the FORMAT column */
private Tab buildFormatHeaderTab(final VCFHeader header)
{
final TableView<VCFFormatHeaderLine> table=new TableView<>(FXCollections.observableArrayList(header.getFormatHeaderLines()));
table.getColumns().add(makeColumn("ID", F->F.getID()));
table.getColumns().add(makeColumn("Type", F->F.getType()==null?null:F.getType().name()));
table.getColumns().add(makeColumn("Count", F->F.isFixedCount()?F.getCount():null));
table.getColumns().add(makeColumn("Description", F->F.getDescription()));
final Tab tab=new Tab("FORMAT",table);
tab.setClosable(false);
table.setPlaceholder(new Label("No FORMAT defined."));
return tab;
}
示例8: writeHeader
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的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);
}
示例9: IgvReview
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
public IgvReview()
{
this.preferences = Preferences.userNodeForPackage(IgvReview.class);
final String userName=System.getProperty("user.name", "user").replace(" ", "_");
this.reviewFormat = new VCFFormatHeaderLine(userName+"_REVIEW",1,VCFHeaderLineType.String,"Review genotypes by "+userName);
}
示例10: getDescriptions
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
public List<VCFFormatHeaderLine> getDescriptions() {
return Arrays.asList(VCFStandardHeaderLines.getFormatLine(getKeyNames().get(0)));
}
示例11: getDescriptions
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
@Override
public List<VCFFormatHeaderLine> getDescriptions() { return Collections.singletonList(new VCFFormatHeaderLine(getKeyNames().get(0), 4, VCFHeaderLineType.Integer, "Per-sample component statistics which comprise the Fisher's Exact Test to detect strand bias.")); }
示例12: getDescriptions
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
public List<VCFFormatHeaderLine> getDescriptions() {
return Collections.singletonList(VCFStandardHeaderLines.getFormatLine(VCFConstants.DEPTH_KEY));
}
示例13: getDescriptions
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
public List<VCFFormatHeaderLine> getDescriptions() { return Arrays.asList(
new VCFFormatHeaderLine(getKeyNames().get(0), 1,
VCFHeaderLineType.Integer, "Number of Mapping Quality Zero Reads per sample")); }
示例14: getDescriptions
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
public List<VCFFormatHeaderLine> getDescriptions() {
return Arrays.asList(new VCFFormatHeaderLine(getKeyNames().get(0), 1, VCFHeaderLineType.Float, "Allele balance for each het genotype"));
}
示例15: getFormatLine
import htsjdk.variant.vcf.VCFFormatHeaderLine; //导入依赖的package包/类
public static VCFFormatHeaderLine getFormatLine(final String id) {
return formatLines.get(id);
}