Gff Class
Gff
GFF Parser Class
PARAMETER | DESCRIPTION |
---|---|
gff_file
|
GFF file (
TYPE:
|
name
|
name (If None,
TYPE:
|
target_seqid
|
Target seqid to be extracted. If None, only first seqid record is extracted.
TYPE:
|
seq_region
property
GFF sequence-region start & end tuple
If ##sequence-region
pragma is not found, seq_region=(0, max_coords_value)
get_seqid2size
Get seqid & complete/contig/scaffold genome size dict
By default, size is defined by ##sequence-region
pragma of target seqid.
If ##sequence-region
is not found, size is defined by max coordinate size in
target seqid features. This may differ from actual genome size.
RETURNS | DESCRIPTION |
---|---|
seqid2size
|
seqid & genome size dict
TYPE:
|
get_seqid2features
get_seqid2features(
feature_type: str | list[str] | None = "CDS", target_strand: int | None = None
) -> dict[str, list[SeqFeature]]
Get seqid & features in target seqid genome dict
PARAMETER | DESCRIPTION |
---|---|
feature_type
|
Feature type (
TYPE:
|
target_strand
|
Extract target strand. If None, extract regardless of strand.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
seqid2features
|
seqid & features dict
TYPE:
|
extract_features
extract_features(
feature_type: str | list[str] | None = "CDS",
*,
target_strand: int | None = None,
target_range: tuple[int, int] | None = None
) -> list[SeqFeature]
Extract features
If target_seqid
is specified when the Gff instance initialized,
then the features of the target seqid are extracted.
Otherwise, extract the features of the seqid in the first row.
PARAMETER | DESCRIPTION |
---|---|
feature_type
|
Feature type (
TYPE:
|
target_strand
|
Extract target strand. If None, extract regardless of strand.
TYPE:
|
target_range
|
Extract target range. If None, extract regardless of range.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
features
|
Feature list
TYPE:
|
extract_exon_features
extract_exon_features(
feature_type: str = "mRNA",
*,
target_strand: int | None = None,
target_range: tuple[int, int] | None = None
) -> list[SeqFeature]
Extract exon structure features
Extract exons based on parent feature
and exon
ID-Parent relation
PARAMETER | DESCRIPTION |
---|---|
feature_type
|
Feature type (e.g.
TYPE:
|
target_strand
|
Extract target strand. If None, extract regardless of strand.
TYPE:
|
target_range
|
Extract target range. If None, extract regardless of range.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
features
|
Feature list
TYPE:
|