![]() |
Coretex
|
Public Member Functions | |
Optional[Self] | createSequenceDataset (cls, str name, int projectId, Union[Path, str] metadataPath, Optional[Dict[str, Any]] meta=None) |
None | download (self, bool decrypt=True, bool ignoreCache=False) |
bool | isPairedEnd (self) |
![]() | |
Path | path (self) |
Self | fetchCachedDataset (cls, List[str] dependencies) |
Self | createDataset (cls, str name, int projectId, Optional[Dict[str, Any]] meta=None) |
str | generateCacheName (cls, str prefix, List[str] dependencies) |
Self | createCacheDataset (cls, str prefix, List[str] dependencies, int projectId) |
bool | finalize (self) |
bool | rename (self, str name) |
SampleType | add (self, Union[Path, str] samplePath, Optional[str] sampleName=None, **Any metadata) |
![]() | |
int | count (self) |
Optional[SampleType] | getSample (self, str name) |
Sequence Dataset class which is used for Datasets whose samples contain sequence data (.fasta, .fastq)
Definition at line 33 of file sequence_dataset.py.
Optional[Self] coretex.entities.dataset.sequence_dataset.sequence_dataset.SequenceDataset.createSequenceDataset | ( | cls, | |
str | name, | ||
int | projectId, | ||
Union[Path, str] | metadataPath, | ||
Optional[Dict[str, Any]] | meta = None |
||
) |
Creates a new sequence dataset with the provided name and metadata Parameters ---------- name : str dataset name projectId : int project for which the dataset will be created metadataPath : Union[Path, str] path the zipped metadata file Returns ------- The created sequence dataset object or None if creation failed Example ------- >>> from coretex import SequenceDataset \b >>> dummyDataset = SequenceDataset.createSequenceDataset("dummyDataset", 123, pathToMetadata) >>> if dummyDataset is not None: print("Dataset created successfully")
Definition at line 64 of file sequence_dataset.py.
None coretex.entities.dataset.sequence_dataset.sequence_dataset.SequenceDataset.download | ( | self, | |
bool | decrypt = True , |
||
bool | ignoreCache = False |
||
) |
Downloads dataset from Coretex Parameters ---------- ignoreCache : bool if dataset is already downloaded and ignoreCache is True it will be downloaded again (not required) Example ------- >>> from coretex import NetworkDataset \b >>> dummyDataset = NetworkDataset.fetchById(1023) >>> dummyDataset.download()
Reimplemented from coretex.entities.dataset.network_dataset.NetworkDataset.
Definition at line 109 of file sequence_dataset.py.
bool coretex.entities.dataset.sequence_dataset.sequence_dataset.SequenceDataset.isPairedEnd | ( | self | ) |
This function returns True if the dataset holds paired-end reads and False if it holds single end. Files for paired-end reads must contain "_R1_" and "_R2_" in their names, otherwise an exception will be raised. If the sample contains gzip compressed sequences, you will have to call Sample.unzip method first otherwise calling Sample.isPairedEnd will raise an exception Raises ------ FileNotFoundError -> if no files meeting the requirements for either single-end or paired-end sequencing reads ValueError -> if dataset has a combination of single-end and paired-end samples
Definition at line 114 of file sequence_dataset.py.