Skip to content

Commit

Permalink
Added ExtendedBedEntry.getField kdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dievsky committed May 17, 2019
1 parent 5c8ba14 commit a81dedd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/kotlin/org/jetbrains/bio/big/Bed.kt
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ data class ExtendedBedEntry(
* Returns a i-th field of a Bed entry. Since ExtendedBedEntry is format-agnostic,
* it doesn't actually know which field is i-th, so we have to provide [fieldsNumber] and [extraFieldsNumber].
* Returns an instance of a correct type ([Int], [String] etc.) or null for missing and out of bounds fields.
* This method is useful for minimizing the number of conversions to and from [String].
* @param i the index of the field being queried (zero-based)
* @param fieldsNumber the number of regular BED fields (N in bedN+K notation)
* @param extraFieldsNumber the number of extra BED fields (0 for bedN, K for bedN+K, null for bedN+).
* The extra fields are always returned as [String].
*/
fun getField(i: Int, fieldsNumber: Int = 12, extraFieldsNumber: Int? = null): Any? {
val actualExtraFieldsNumber = extraFieldsNumber ?: extraFields?.size ?: 0
Expand Down

0 comments on commit a81dedd

Please sign in to comment.