-
Notifications
You must be signed in to change notification settings - Fork 1
File Handler
The package is designed for reading and writing the data. This is documentation for file handler package. Functions for general use:
- get_gb
- make_dir
- read_file
- set_entrez_param
- write_exome_fasta
- write_nucleotide_fasta
- write_protein_fasta
Detailed description of functions are given below.
Retrieves the Sequence Record object from a given accession number
-
accession_id
: Provided accession number
Returns the retrieved genebank (gb) file as a SeqRecord object. For details about SeqRecord object click here.
Makes a directory if not present already
-
path
: Path of the directory
Returns a dataframe from given csv file
-
file_name
: Name or path to csv file
Returns the read cvs file in the pandas DataFrame object. For details about pd.DataFrame click here.
Sets entrez parameters, viz. email id and API key.
-
email
: Email of the user (optional) -
api_key
: API key of the user (optional)
This function can show the following warning
-
EmailWarning
: If no email is provided -
ApiWarning
: If no API key is provided
Note
It is advised to add your email to NCBI before using the function. You can have your own API key. For details about how to get API key click here.
Creates a fasta file of exome if not exists previously or is empty
-
file_name
: The name or path of the file to be created -
nuc_file_path
: The path of nucleotide file from where the exome is tobe extracted -
organism_name
: Name of the organism
This function can show the following warning
-
FileNotEmptyError
: If the given file to write is not empty
Creates a fasta file of nucleotides if not exists previously or is empty
-
file_name
: The name or path of the file to be created -
cds_lst
: The tuple of FeatureLocation objects -
record
: The SeqRecord object containing whole sequence -
organism_name
: Name of the organism
This function can show the following warning
-
FileNotEmptyError
: If the given file to write is not empty
For details about FeatureLocation object click here. For details about SeqRecord object click here.
Creates a fasta file of proteins if not exists previously or is empty
-
file_name
: The name or path of the file to be created -
cds_lst
: The tuple of FeatureLocation objects -
record
: The SeqRecord object containing whole sequence
This function can show the following warning
-
FileNotEmptyError
: If the given file to write is not empty
© 2023 Souradipto Choudhuri
© 2023 Souradipto Choudhuri