Coretex
coretex.entities.sample.sequence_sample.sequence_sample.SequenceSample Class Reference
Inheritance diagram for coretex.entities.sample.sequence_sample.sequence_sample.SequenceSample:
coretex.entities.sample.network_sample.NetworkSample coretex.entities.sample.sequence_sample.local_sequence_sample.LocalSequenceSample coretex.entities.sample.sample.Sample coretex.entities.sample.local_sample.LocalSample coretex.entities.sample.sample.Sample

Public Member Functions

bool isValidSequenceFile (cls, Union[Path, str] path)
 
- Public Member Functions inherited from coretex.entities.sample.network_sample.NetworkSample
Path path (self)
 
Path zipPath (self)
 
Path downloadPath (self)
 
bool modifiedSinceLastDownload (self)
 
None decrypt (self, bool ignoreCache=False)
 
None download (self, bool decrypt=True, bool ignoreCache=False)
 
None unzip (self, bool ignoreCache=False)
 
- Public Member Functions inherited from coretex.entities.sample.sample.Sample
Path joinPath (self, Union[Path, str] other)
 
- Public Member Functions inherited from coretex.entities.sample.sequence_sample.local_sequence_sample.LocalSequenceSample
Path sequencePath (self)
 
Path forwardPath (self)
 
Path reversePath (self)
 
None unzip (self, bool ignoreCache=False)
 
bool isPairedEnd (self)
 
- Public Member Functions inherited from coretex.entities.sample.local_sample.LocalSample
Path path (self)
 
Path zipPath (self)
 
None download (self, bool decrypt=True, bool ignoreCache=False)
 

Detailed Description

    Represents the local custom Sample class
    which is used for working with Other Task locally

Definition at line 25 of file sequence_sample.py.

Member Function Documentation

◆ isValidSequenceFile()

bool coretex.entities.sample.sequence_sample.sequence_sample.SequenceSample.isValidSequenceFile (   cls,
Union[Path, str]  path 
)
    Checks whether the file is a valid sequence file or not.
    File is a valid sequence file if it ends with any of these extensions:
        - .fasta
        - .fastq
        - .fa
        - .fq

Definition at line 36 of file sequence_sample.py.

36  def isValidSequenceFile(cls, path: Union[Path, str]) -> bool:
37  """
38  Checks whether the file is a valid sequence file or not.
39  File is a valid sequence file if it ends with any of these extensions:
40  - .fasta
41  - .fastq
42  - .fa
43  - .fq
44  """
45 
46  if not isinstance(path, Path):
47  path = Path(path)
48 
49  supportedExtensions = cls.supportedExtensions()
50  supportedExtensions.extend([f"{extension}.gz" for extension in cls.supportedExtensions()])
51 
52  return any(path.name.endswith(extension) for extension in supportedExtensions)

The documentation for this class was generated from the following file: