Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add data to metadata summary pane #66

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/views/show-results/DisplayMetadata.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<script setup lang="ts">
import type { Metadata } from "@/model/Metadata";
import type { PropType } from "vue";

const props = defineProps({
id: { type: String },
metadata: { type: Object as PropType<Metadata>, required: true },
});
</script>

<template>
<table>
<tbody>
<tr v-if="metadata.project_name">
<th class="text-end">Project Name:</th>
<td class="ps-5">{{ metadata.project_name }}</td>
</tr>
<tr v-if="metadata.sample?.collection_date">
<th class="text-end">Collection Date:</th>
<td class="ps-5">{{ metadata.sample.collection_date }}</td>
</tr>
<tr v-if="metadata.sample?.country">
<th class="text-end">Country:</th>
<td class="ps-5">{{ metadata.sample.country }}</td>
</tr>
<tr v-if="metadata.sequencing?.instrument_model">
<th class="text-end">Sequencing Instrument:</th>
<td class="ps-5">{{ metadata.sequencing?.instrument_model }}</td>
</tr>
</tbody>
</table>
</template>
2 changes: 2 additions & 0 deletions src/views/show-results/ResultView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ state.value.setState(State.Loading);
baktaResult &&
gtdbtkResult &&
checkmResult &&
metadata &&
mlstResult
"
>
Expand All @@ -113,6 +114,7 @@ state.value.setState(State.Loading);
:gtdbtk="gtdbtkResult"
:checkm="checkmResult"
:mlst="mlstResult"
:metadata="metadata"
/>
</template>
<template v-if="active_tab == 'metadata'">
Expand Down
7 changes: 6 additions & 1 deletion src/views/show-results/SummaryPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ import type { PropType } from "vue";
import BaktaStats from "@/views/show-results/bakta/BaktaStats.vue";
import DisplayAssembly from "@/views/show-results/DisplayAssembly.vue";
import GtdbtkTaxonomy from "@/views/show-results/GtdbtkTaxonomy.vue";
import DisplayMetadata from "./DisplayMetadata.vue";
import PhylogenyTree from "@/components/PhylogenyTree.vue";
import ContigBar from "@/components/ContigBar.vue";
import type { Metadata } from "@/model/Metadata";

const props = defineProps({
id: { type: String },
bakta: { type: Object as PropType<BaktaResult>, required: true },
checkm: { type: Object as PropType<CheckmResult>, required: true },
gtdbtk: { type: Object as PropType<GtdbtkResult>, required: true },
mlst: { type: Object as PropType<MlstResult>, required: true },
metadata: { type: Object as PropType<Metadata>, required: true },
});
</script>

Expand All @@ -25,7 +28,9 @@ const props = defineProps({
<div class="col-lg-4 col-md-12">
<div class="card h-100">
<div class="card-header">Metadata</div>
<div class="card-body">...</div>
<div class="card-body">
<DisplayMetadata :metadata="metadata" />
</div>
</div>
</div>
<div class="col-lg-4 col-md-12">
Expand Down