:warning: Follow as much as possible the following examples to document the docstrings.
:warning: If there is any question, ask me in the comments of this issue!!
:warning: Commit changes in msm branch
Examples
Example for line 235-236 (class docstring):
class VcfHeader:
def __init__(self, filepath=None):
"""
Class to store metadata information from the header of a VCF formatted file.
:param filepath: path/to/file.vcf(.gz)
"""
# Initialize all properties to None
self._vcf_filepath = None
self._header = None
self._file_format = None
Example for line 257-258 (private method docstring):
# Private methods
def _load_header_from_vcf_filepath(self, filepath: str) -> vcfpy.header.Header:
"""
Loads the header content from a VCF filepath in a vcfpy.header.Header class.
:param filepath: path/to/file.vcf
"""
self._header = vcfpy.Reader.from_path(filepath).header
Example for line 377-378 (getter):
@property
def variant_caller(self):
"""
Returns a VariantCaller object (see VariantCaller class)
:return: VariantCaller
"""
return self._variant_caller
Example for line 383-384 (setter)
@variant_caller.setter
def variant_caller(self, value):
"""
Creates a VariantCaller object from a dict with required keys and values.
:param value: Dict with the following format:
{
"name": str,
"version": str,
}
"""
if type(value) == dict:
self._variant_caller = VariantCaller()
self._variant_caller.mapping = value
:warning: IMPORTANT NOTE
:warning: Follow as much as possible the following examples to document the docstrings.
:warning: If there is any question, ask me in the comments of this issue!!
:warning: Commit changes in
msm
branchExamples