-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from wtsi-npg/devel
Release 2.3.0
- Loading branch information
Showing
33 changed files
with
1,143 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script setup> | ||
import { ref } from "vue"; | ||
import { ElTooltip, ElCollapse, ElCollapseItem } from "element-plus"; | ||
const props = defineProps({ | ||
pool: Object, | ||
}) | ||
const active = ref([]) | ||
</script> | ||
|
||
<template> | ||
<el-collapse v-model="active" accordion> | ||
<el-collapse-item name="1"> | ||
<template #title><slot>Pool composition</slot></template> | ||
<el-tooltip content="Caution, this value is of low signficance when the pool size is small"> | ||
<p>Coefficient of Variance: {{ props.pool.pool_coeff_of_variance }}</p> | ||
</el-tooltip> | ||
<table> | ||
<tr> | ||
<th>Sample</th> | ||
<th>Tag 1</th> | ||
<th>Tag 2</th> | ||
<th>Deplexing barcode ID</th> | ||
<th>HiFi bases (Gb)</th> | ||
<th>HiFi reads</th> | ||
<th>HiFi mean read length</th> | ||
<th>Percentage of HiFi bases</th> | ||
<th>Percentage of total reads</th> | ||
</tr> | ||
<tr :key="library.id_product" v-for="library in props.pool.products"> | ||
<td>{{ library.sample_name }}</td> | ||
<td>{{ library.tag1_name }}</td> | ||
<td>{{ library.tag2_name }}</td> | ||
<td>{{ library.deplexing_barcode }}</td> | ||
<td>{{ library.hifi_read_bases }}</td> | ||
<td>{{ library.hifi_num_reads }}</td> | ||
<td>{{ library.hifi_read_length_mean }}</td> | ||
<td>{{ library.hifi_bases_percent }}</td> | ||
<td class="MetricYellow">{{ library.percentage_total_reads }}</td> | ||
</tr> | ||
</table> | ||
</el-collapse-item> | ||
</el-collapse> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { describe, expect, test } from 'vitest' | ||
import { mount } from '@vue/test-utils' | ||
import ElementPlus from 'element-plus' | ||
|
||
import PoolStats from '../PoolStats.vue' | ||
|
||
const wrapper = mount(PoolStats, { | ||
global: { | ||
plugins: [ElementPlus], | ||
}, | ||
props: { | ||
pool: { | ||
pool_coeff_of_variance: 47.2, | ||
products: [{ | ||
id_product: 'A'.repeat(64), | ||
sample_name: 'allthets', | ||
tag1_name: 'TTTTTTTT', | ||
tag2_name: null, | ||
deplexing_barcode: 'bc10--bc10', | ||
hifi_read_bases: 900, | ||
hifi_num_reads: 20, | ||
hifi_read_length_mean: 45, | ||
hifi_bases_percent: 90.001, | ||
percentage_total_reads: 66.6 | ||
},{ | ||
id_product: 'B'.repeat(64), | ||
sample_name: null, | ||
tag1_name: 'GGGGGGGG', | ||
tag2_name: null, | ||
deplexing_barcode: 'bc11--bc11', | ||
hifi_read_bases: 100, | ||
hifi_num_reads: 10, | ||
hifi_read_length_mean: 10, | ||
hifi_bases_percent: 100, | ||
percentage_total_reads: 33.3 | ||
}] | ||
} | ||
} | ||
}) | ||
|
||
describe('Create poolstats table with good data', () => { | ||
test('Component is "folded" by default', () => { | ||
expect(wrapper.getComponent('transition-stub').attributes()['appear']).toEqual('false') | ||
}) | ||
|
||
test('Coefficient of variance showing', async () => { | ||
let topStat = wrapper.find('p') | ||
await topStat.trigger('focus') | ||
expect(topStat.classes('el-tooltip__trigger')).toBeTruthy() | ||
|
||
expect(topStat.text()).toEqual('Coefficient of Variance: 47.2') | ||
}) | ||
|
||
test('Table looks about right', () => { | ||
let rows = wrapper.findAll('tr') | ||
expect(rows.length).toEqual(3) | ||
|
||
// Check tag 1 has been set | ||
expect(rows[1].findAll('td')[1].text()).toEqual('TTTTTTTT') | ||
expect(rows[2].findAll('td')[1].text()).toEqual('GGGGGGGG') | ||
|
||
// Sample name column set appropriately | ||
expect(rows[1].find('td').text()).toEqual('allthets') | ||
expect(rows[2].find('td').text()).toEqual('') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "2.2.0" | ||
__version__ = "2.3.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.