Skip to content

Commit 16f9aa8

Browse files
committed
.
1 parent 9a9970a commit 16f9aa8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

docs/API.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The method *get_tag_field_idx(tag, field, tag_type='INFO', sep='|')* allows to g
8484
# ##INFO=<ID=CSQ,Number=.,Type=String,Description="Consequence annotations from Ensembl VEP. Format: Gene|Feature|Consequence|IMPACT|...">
8585

8686
tag, field = 'CSQ', 'Consequence'
87-
idx <int> -> 3 = vcf_obj.header.get_tag_field_idx(tag, field)
87+
idx <int> = vcf_obj.header.get_tag_field_idx(tag, field)
8888

8989
The method *check_tag_definition(tag, tag_type='INFO', sep='|')* allows to check if a tag is in the header and if is standalone or field of another leading tag. Returns the leading tag and the field corresponding index, if any, to access the tag. *sep* is the fields separator used in the tag definition.
9090

@@ -93,7 +93,7 @@ The method *check_tag_definition(tag, tag_type='INFO', sep='|')* allows to check
9393
# ##INFO=<ID=CSQ,Number=.,Type=String,Description="Consequence annotations from Ensembl VEP. Format: Gene|Feature|Consequence|IMPACT|...">
9494

9595
tag = 'Consequence'
96-
lead_tag <str> -> CSQ, idx <int> idx -> 3 = vcf_obj.header.check_tag_definition(tag)
96+
lead_tag <str>, idx <int> = vcf_obj.header.check_tag_definition(tag)
9797

9898
*note: tag and field are case sensitive.*
9999

@@ -207,10 +207,12 @@ The method *remove_tag_info(tag, sep=';')* allows to remove a tag or a flag from
207207
The method *add_tag_info(tag_value, sep=';')* allows to add a tag and its value or a flag at the end of INFO. *sep* is the tags separator used in INFO.
208208

209209
# Add tag and value to INFO
210+
210211
tag_value = 'tag=value'
211212
vnt_obj.add_tag_info(tag_value)
212213

213214
# Add flag to INFO
215+
214216
tag_value = 'flag'
215217
vnt_obj.add_tag_info(tag_value)
216218

@@ -220,9 +222,11 @@ The method *get_tag_value(tag, is_flag=False, sep=';')* returns the value from t
220222
If the tag is a flag set *is_flag=True*, the function will now return True or False instead.
221223

222224
# Get tag value from INFO
225+
223226
tag_val <str> = vnt_obj.get_tag_value(tag)
224227

225228
# Check flag in INFO
229+
226230
tag_val <bool> = vnt_obj.get_tag_value(tag, is_flag=True)
227231

228232
*note: tag and ID are case sensitive.*

0 commit comments

Comments
 (0)