Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Sep 26, 2023
1 parent df26f6b commit 2a6f85a
Show file tree
Hide file tree
Showing 9 changed files with 26,407 additions and 16,719 deletions.
4 changes: 3 additions & 1 deletion cases_qc/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def tearDown(self):
super().tearDown()
# recover all factory.Faker random states
default_faker = factory.Faker._get_faker()
for the_factory, generator in zip(default_faker.factories, self._FixRandomSeedMixin__faker_generators):
for the_factory, generator in zip(
default_faker.factories, self._FixRandomSeedMixin__faker_generators
):
the_factory._Generator__random = generator
# recover the random module's state
random.setstate(self._FixRandomSeedMixin__random_state)
Expand Down
123 changes: 84 additions & 39 deletions cases_qc/tests/snapshots/snap_test_io_cramino.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,95 @@

from snapshottest import GenericRepr, Snapshot


snapshots = Snapshot()

snapshots['CraminoLoadTest::test_load 1'] = [
'_state',
'id',
'sodar_uuid',
'date_created',
'date_modified',
'caseqc_id',
'sample',
'summary',
'chrom_counts'
snapshots["CraminoLoadTest::test_load 1"] = [
"_state",
"id",
"sodar_uuid",
"date_created",
"date_modified",
"caseqc_id",
"sample",
"summary",
"chrom_counts",
]

snapshots['CraminoLoadTest::test_load 2'] = {
'chrom_counts': [
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr1', normalized_counts=1.02)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr10', normalized_counts=1.02)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr11', normalized_counts=1.02)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr12', normalized_counts=1.01)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr13', normalized_counts=0.85)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr14', normalized_counts=0.83)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr15', normalized_counts=0.84)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr16', normalized_counts=1.03)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr17', normalized_counts=1.06)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr18', normalized_counts=0.98)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr19', normalized_counts=1.04)"),
snapshots["CraminoLoadTest::test_load 2"] = {
"chrom_counts": [
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr1', normalized_counts=1.02)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr10', normalized_counts=1.02)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr11', normalized_counts=1.02)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr12', normalized_counts=1.01)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr13', normalized_counts=0.85)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr14', normalized_counts=0.83)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr15', normalized_counts=0.84)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr16', normalized_counts=1.03)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr17', normalized_counts=1.06)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr18', normalized_counts=0.98)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr19', normalized_counts=1.04)"
),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr2', normalized_counts=1.0)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr20', normalized_counts=1.09)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr21', normalized_counts=0.92)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr22', normalized_counts=0.8)"),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr20', normalized_counts=1.09)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr21', normalized_counts=0.92)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr22', normalized_counts=0.8)"
),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr3', normalized_counts=1.0)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr4', normalized_counts=0.99)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr5', normalized_counts=0.99)"),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr4', normalized_counts=0.99)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr5', normalized_counts=0.99)"
),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr6', normalized_counts=1.0)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr7', normalized_counts=1.0)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr8', normalized_counts=0.99)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chr9', normalized_counts=0.94)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chrEBV', normalized_counts=23.65)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chrMT', normalized_counts=333.16)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chrX', normalized_counts=0.95)"),
GenericRepr("CraminoChromNormalizedCountsRecord(chrom_name='chrY', normalized_counts=0.04)")
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr8', normalized_counts=0.99)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chr9', normalized_counts=0.94)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chrEBV', normalized_counts=23.65)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chrMT', normalized_counts=333.16)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chrX', normalized_counts=0.95)"
),
GenericRepr(
"CraminoChromNormalizedCountsRecord(chrom_name='chrY', normalized_counts=0.04)"
),
],
'sample': 'sample',
'summary': [
"sample": "sample",
"summary": [
GenericRepr("CraminoSummaryRecord(key='File name', value='NA12878.bam')"),
GenericRepr("CraminoSummaryRecord(key='Number of reads', value=41169470)"),
GenericRepr("CraminoSummaryRecord(key='Yield [Gb]', value=199.86)"),
Expand All @@ -63,6 +106,8 @@
GenericRepr("CraminoSummaryRecord(key='Mean identity', value=97.69)"),
GenericRepr("CraminoSummaryRecord(key='Path', value='/path/to/NA12878.bam')"),
GenericRepr("CraminoSummaryRecord(key='Creation time', value='24/04/2023 20:51:37')"),
GenericRepr("CraminoSummaryRecord(key='Checksum', value='45EBB3BBD5DABA01A7997558DDF81429')")
]
GenericRepr(
"CraminoSummaryRecord(key='Checksum', value='45EBB3BBD5DABA01A7997558DDF81429')"
),
],
}
Loading

0 comments on commit 2a6f85a

Please sign in to comment.