Reference

Utilities

Test helper functions.

class resolwe_bio.utils.test.BioProcessTestCase(methodName='runTest')[source]

Base class for writing bioinformatics process tests.

It is a subclass of Resolwe’s ProcessTestCase with some specific functions used for testing bioinformatics processes.

prepare_amplicon_master_file(mfile='56G_masterfile_test.txt', pname='56G panel, v2')[source]

Prepare amplicon master file.

prepare_annotation(fn='sp_test.gtf', source='DICTYBASE', species='Dictyostelium discoideum', build='dd-05-2009')[source]

Prepare annotation GTF.

prepare_annotation_gff(fn='annotation dicty.gff.gz', source='DICTYBASE', species='Dictyostelium discoideum', build='dd-05-2009')[source]

Prepare annotation GFF3.

prepare_bam(fn='sp_test.bam', species='Dictyostelium discoideum', build='dd-05-2009')[source]

Prepare alignment BAM.

prepare_expression(f_rc='exp_1_rc.tab.gz', f_exp='exp_1_tpm.tab.gz', f_type='TPM', name='Expression', source='DICTYBASE', descriptor=None, feature_type='gene', species='Dictyostelium discoideum', build='dd-05-2009')[source]

Prepare expression.

prepare_paired_reads(mate1=['fw reads.fastq.gz'], mate2=['rw reads.fastq.gz'])[source]

Prepare NGS reads FASTQ.

prepare_reads(fn=['reads.fastq.gz'])[source]

Prepare NGS reads FASTQ.

prepare_ref_seq(fn='adapters.fasta', species='Other', build='Illumina adapters')[source]

Prepare reference sequence FASTA.

setUp()[source]

Initialize test files path.

class resolwe_bio.utils.test.KBBioProcessTestCase(methodName='runTest')[source]

Class for bioinformatics process tests that use knowledge base.

It is based on BioProcessTestCase and Django’s LiveServerTestCase. The latter launches a live Django server in a separate thread so that the tests may use it to query the knowledge base.

setUp()[source]

Set-up test gene information knowledge base.

resolwe_bio.utils.test.skipDockerFailure(reason)[source]

Skip decorated tests due to failures when run in Docker.

Unless TESTS_SKIP_DOCKER_FAILURES Django setting is set to False. reason should describe why the test is being skipped.

resolwe_bio.utils.test.skipUnlessLargeFiles(*files)[source]

Skip decorated tests unless large files are available.

Parameters:*files (list) – variable lenght files list, where each element represents a large file path relative to the TEST_LARGE_FILES_DIR directory