extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/vcf/InfoFactory.java

Code
Comments
Other
Rev Date Author Line
5729 18 Nov 19 nicklas 1 package net.sf.basedb.reggie.vcf;
5729 18 Nov 19 nicklas 2
5729 18 Nov 19 nicklas 3 /**
5729 18 Nov 19 nicklas 4   Factory class for extracting information from the 
5729 18 Nov 19 nicklas 5   INFO field of a VCF. Implementations will get notified
5729 18 Nov 19 nicklas 6   for each ##INFO header via {@link #addInfoHeader(String, String)}
5729 18 Nov 19 nicklas 7   and then, for each entry, the INFO column via {@link #getInfo(String)}
5729 18 Nov 19 nicklas 8   
5729 18 Nov 19 nicklas 9   @since 4.24
5729 18 Nov 19 nicklas 10 */
5729 18 Nov 19 nicklas 11 public interface InfoFactory
5729 18 Nov 19 nicklas 12 {
5729 18 Nov 19 nicklas 13
5729 18 Nov 19 nicklas 14   /**
5729 18 Nov 19 nicklas 15     This method is called by the VcfParser once for every
5729 18 Nov 19 nicklas 16     ##INFO header in the VCF. The ID attribute has been
5729 18 Nov 19 nicklas 17     extracted and is passed as the id parameter. The
5729 18 Nov 19 nicklas 18     other attributes are not parsed but passed as a
5729 18 Nov 19 nicklas 19     the data string. The following pattern is
5729 18 Nov 19 nicklas 20     used to parse the header: ##INFO=<ID=(\w+),(.*)>
5729 18 Nov 19 nicklas 21   */
5729 18 Nov 19 nicklas 22   public void addInfoHeader(String id, String data);
5729 18 Nov 19 nicklas 23   
5729 18 Nov 19 nicklas 24   /**
5729 18 Nov 19 nicklas 25     This method is called by the VcfParser once for
5729 18 Nov 19 nicklas 26     every data line in the VCF with data for the info
5729 18 Nov 19 nicklas 27     column and the information about the SNP that 
5729 18 Nov 19 nicklas 28     has already been extracted.
5729 18 Nov 19 nicklas 29     @return An InfoData object or null
5729 18 Nov 19 nicklas 30   */
5729 18 Nov 19 nicklas 31   public InfoData getInfo(String info, SnpData snp);
5729 18 Nov 19 nicklas 32   
5729 18 Nov 19 nicklas 33 }