public class GenomeFeatureBuilder extends Object
Constructor and Description |
---|
GenomeFeatureBuilder()
Generic constructor which does nothing special
|
GenomeFeatureBuilder(GenomeFeature feature)
Constructor to build a new feature off of an existing one.
|
Modifier and Type | Method and Description |
---|---|
GenomeFeatureBuilder |
addAnnotation(String key,
String value) |
GenomeFeature |
build()
Public accessor method to get a new GenomeFeatureBuilder based off an existing GenomeFeature
TODO: Get this matching other getInstance methods better; doesn't seem to fit, so commented out for now
//@param feature
//@return
|
GenomeFeatureBuilder |
chromosome(Chromosome chr) |
GenomeFeatureBuilder |
chromosome(int chr) |
GenomeFeatureBuilder |
chromosome(String chr) |
static String |
getFeatureIdFromGffAttributes(String attributes)
Parse a GFF attribute field to identify the name of the current GenomeFeature.
|
static String |
getParentFromGffAttributes(String attributes)
Parse a GFF attribute field to identify the parent of the current GenomeFeature.
|
GenomeFeatureBuilder |
id(String id) |
GenomeFeatureBuilder |
loadAll(HashMap<String,String> newAnnotations)
Load all annotations from a hashmap.
|
GenomeFeatureBuilder |
parentId(String parentId) |
GenomeFeatureBuilder |
parseGffLine(String line)
Create a GenomeFeature from a line of GFF file.
|
GenomeFeatureBuilder |
parseJsonObject(org.json.simple.JSONObject featureData) |
GenomeFeatureBuilder |
position(int position) |
GenomeFeatureBuilder |
position(String position) |
GenomeFeatureBuilder |
start(int start) |
GenomeFeatureBuilder |
start(String start) |
GenomeFeatureBuilder |
stop(int stop) |
GenomeFeatureBuilder |
stop(String stop) |
static String |
synonymizeKeys(String key)
Method that takes common synonyms of annotation types and standardizes them according to the following rules:
(1) Make lowercase
(2) Standardize according to following rules.
|
GenomeFeatureBuilder |
type(String type) |
public GenomeFeatureBuilder()
public GenomeFeatureBuilder(GenomeFeature feature)
feature
- The genome feature to copypublic GenomeFeature build()
public GenomeFeatureBuilder id(String id)
public GenomeFeatureBuilder type(String type)
public GenomeFeatureBuilder parentId(String parentId)
public GenomeFeatureBuilder chromosome(Chromosome chr)
public GenomeFeatureBuilder chromosome(String chr)
public GenomeFeatureBuilder chromosome(int chr)
public GenomeFeatureBuilder start(int start)
public GenomeFeatureBuilder start(String start)
public GenomeFeatureBuilder stop(int stop)
public GenomeFeatureBuilder stop(String stop)
public GenomeFeatureBuilder position(String position)
public GenomeFeatureBuilder position(int position)
public GenomeFeatureBuilder addAnnotation(String key, String value)
public static String synonymizeKeys(String key)
key
- The key to standardizepublic GenomeFeatureBuilder loadAll(HashMap<String,String> newAnnotations)
public GenomeFeatureBuilder parseGffLine(String line)
line
- A single line from a GFF file as a stringpublic static String getParentFromGffAttributes(String attributes)
attributes
- The string from the attribute field of the GFF filepublic static String getFeatureIdFromGffAttributes(String attributes)
attributes
- The string from the attribute field of the GFF file. REturns null if not foundpublic GenomeFeatureBuilder parseJsonObject(org.json.simple.JSONObject featureData)
Copyright © 2018. All rights reserved.