prokbert.sequtils.load_contigs
- prokbert.sequtils.load_contigs(fasta_files_list, adding_reverse_complement=True, IsAddHeader=False, AsDataFrame=False)
Load contigs from a list of fasta files.
- Parameters
fasta_files_list (list: list: list) – List of paths to fasta files. Compressed (gz) fasta files are accepted as well.
adding_reverse_complement (bool, optional) – If True, add the reverse complement of each sequence. Defaults to True.
IsAddHeader (bool, optional) – If True, include the fasta ID and description in the output. Defaults to False.
AsDataFrame (bool, optional) – If True, return the sequences as a pandas DataFrame. Defaults to False.
- Returns
The loaded sequences. Each sequence is represented as a string if IsAddHeader is False, or as a list [fasta_id, description, source_file, sequence, orientation] if IsAddHeader is True. If AsDataFrame is True, the sequences are returned as a DataFrame.
- Return type
list or DataFrame