MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / addInfo

Method addInfo

src/main/java/com/rtg/vcf/VcfRecord.java:391–400  ·  view source on GitHub ↗

Adds an info field @param key key for field @param values values for the field. Any individual value containing a comma will be split. @return this, for call chaining

(String key, String... values)

Source from the content-addressed store, hash-verified

389 * @return this, for call chaining
390 */
391 public VcfRecord addInfo(String key, String... values) {
392 final String old = mInfo.get(key);
393 if (values == null) {
394 mInfo.put(key, old == null ? "" : old);
395 } else {
396 final String joined = StringUtils.join(ALT_CALL_INFO_SEPARATOR, values);
397 mInfo.put(key, old == null || old.length() == 0 ? joined : StringUtils.join(ALT_CALL_INFO_SEPARATOR, old, joined));
398 }
399 return this;
400 }
401
402 /**
403 * Adds or resets an info field

Callers 5

testGetDistributionMethod · 0.95
annotateMethod · 0.80
checkMendeliannessMethod · 0.80
setSyncIdMethod · 0.80
setSyncIdMethod · 0.80

Calls 4

joinMethod · 0.95
getMethod · 0.65
lengthMethod · 0.65
putMethod · 0.45

Tested by 1

testGetDistributionMethod · 0.76