decima.utils package¶
Submodules¶
decima.utils.dataframe module¶
- class decima.utils.dataframe.ChunkDataFrameWriter(output_path)[source]¶
Bases:
object
decima.utils.inject module¶
- class decima.utils.inject.SeqBuilder(chrom, start, end, anchor, track=None)[source]¶
Bases:
object
Build the sequence from the variants.
- Parameters:
- decima.utils.inject.prepare_seq_alt_allele(gene, variants)[source]¶
Prepare the sequence and alt allele for a gene.
Example
————–{———}——–: ref *——x——{———}——–: alt new sequence fetched from the upsteam due to deletion.
————–{———}——–: ref ————–{—-++—}—-++–: alt 4 bp cropped from the downstream due to insertion.
^anchor
- Parameters:
gene (
GeneMetadata
) – gene metadata in the format of GeneMetadata.variants (
List
[Dict
]) – variants to inject in the format of [{“chrom”: str, “pos”: int, “ref”: str, “alt”: str}, …].
- Returns:
the sequence (str) and gene mask start and end positions (int, int)
- Return type: