CodonU.extractor
Submodules
Package Contents
Functions
|
Extracts the list of features if their type is CDS |
|
Returns the CDS as a Sequence Record object |
- CodonU.extractor.extract_cds_lst(record: Bio.SeqRecord.SeqRecord) tuple[Any, Ellipsis]
Extracts the list of features if their type is CDS
- Parameters:
record – Original Sequence Record object from where the CDS is to be extracted
- Returns:
A tuple of FeatureLocation objects
- CodonU.extractor.extract_cds(record: Bio.SeqRecord.SeqRecord, cds_feature: Bio.SeqFeature.SeqFeature) Bio.SeqRecord.SeqRecord
Returns the CDS as a Sequence Record object
- Parameters:
record – Original Sequence Record object from where the CDS is to be extracted
cds_feature – Sequence Feature object of corresponding SeqRecord object
- Returns:
The new Sequence Record object containing the CDS
- CodonU.extractor.extract_prot(feature: Bio.SeqFeature.SeqFeature, organism_name: str) Bio.SeqRecord.SeqRecord
Extracts protein sequences and return them for writing
- Parameters:
feature – The CDS
organism_name – Name of the organism
cds_no – Number of the CDS
- Returns:
The protein sequence suitable for being written is fasta format
- CodonU.extractor.extract_exome(records: list[Bio.SeqRecord.SeqRecord], exclude_stops: bool = True) Bio.SeqRecord.SeqRecord
Extracts the exome from given nucleotides :param records: List of SeqRecord objects containing each CDS :param exclude_stops: If true, intermediate stops codons are excluded from exome :return: The exome