Skip to content

Commit

Permalink
DONE #86 (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
eboileau committed May 23, 2024
1 parent 67898cd commit 28dd9ae
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 15 deletions.
13 changes: 12 additions & 1 deletion client/src/components/upload/UploadForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const technology = ref([])
const assembly = ref([])
const message = ref()
const filename = ref()
const loading = ref(false)
const ProjectList = defineAsyncComponent(() => import('@/components/project/ProjectList.vue'))
const dialog = useDialog()
Expand Down Expand Up @@ -107,15 +108,18 @@ const [title, titleProps] = defineField('title')
const onSubmit = handleSubmit((values) => {
message.value = undefined
loading.value = true
HTTPSecure.post('/management/dataset', values)
.then((response) => {
loading.value = false
if (response.status == 200) {
router.push({ name: 'home' })
}
})
.catch((error) => {
message.value = error.response.data.message
console.log(error)
loading.value = false
})
})
Expand Down Expand Up @@ -319,9 +323,16 @@ onMounted(() => {
<Message severity="error" :closable="false">{{ message }}</Message>
</div>
<div class="flex flow-row justify-center pt-4 gap-4">
<Button label="Upload" size="large" type="submit" />
<Button label="Upload" size="large" type="submit" icon="pi pi-sync" :loading="loading" />
<Button label="Cancel" size="large" severity="danger" @click="dropForm" />
</div>
<div class="flex justify-center italic mt-4">
Do not refresh the page during upload! This may take a few minutes, as we validate,
annotate, and eventually lift over your data...
</div>
<div class="flex justify-center italic">
You will be redirected to the main page upon successful upload.
</div>
</form>
</div>
</template>
3 changes: 3 additions & 0 deletions client/src/views/CompareView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const onExport = () => {
function load(operation) {
records.value = undefined
loading.value = true
uploadMessage.value = undefined
var arrayOp = operation.split('-')
HTTP.get('/dataset/compare', {
params: {
Expand All @@ -80,6 +81,8 @@ function load(operation) {
.catch((error) => {
uploadMessage.value = error.response.data.message
console.log(error)
records.value = undefined
loading.value = false
})
}
Expand Down
62 changes: 53 additions & 9 deletions client/src/views/DocumentationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import SubTitle from '@/components/ui/SubTitle.vue'
<!-- </a> -->
<!-- </div> -->
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25">
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
Query nomenclature
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Expand All @@ -39,7 +39,7 @@ import SubTitle from '@/components/ui/SubTitle.vue'
>Detection technologies for RNA modifications</a
>.
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25">
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
Project and dataset
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Expand All @@ -53,7 +53,7 @@ import SubTitle from '@/components/ui/SubTitle.vue'
modification, but is uniquely associated with a given species (including cell type,
tissue, or organ) and technology.
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25">
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
bedRMod format
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Expand Down Expand Up @@ -99,13 +99,17 @@ import SubTitle from '@/components/ui/SubTitle.vue'
>bedRMod format specification</a
>.
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25">Assembly</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
Assembly
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Available assemblies for different organisms define the assembly version used in
Sci-ModoM. Dataset that do not match the database assembly version are lifted over. Only
chromosomes are considered.
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25">Annotation</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
Annotation
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Annotation are created by intersecting dataset records with features (UTRs, CDS, ...)
merged across transcripts extracted from a given Ensembl GTF file.
Expand All @@ -121,7 +125,7 @@ import SubTitle from '@/components/ui/SubTitle.vue'
>.
</p>
</div>
<!-- HOW TO ---- -->
<!-- HOW TO -->
<div class="text-justify m-6 dark:text-white/80">
<h1 class="font-ham text-4xl font-semibold m-auto pt-4 pb-4">
<span>Search</span>
Expand Down Expand Up @@ -180,7 +184,7 @@ import SubTitle from '@/components/ui/SubTitle.vue'
query time. Records can be exported to CSV.
</p>
</div>
<!-- DATA MANAGEMENT ---- -->
<!-- DATA MANAGEMENT -->
<div class="text-justify m-6 dark:text-white/80">
<h1 class="font-ham text-4xl font-semibold m-auto pt-4 pb-4">
<span>Data management</span>
Expand All @@ -190,7 +194,7 @@ import SubTitle from '@/components/ui/SubTitle.vue'
users can however register to propose new projects, and eventually upload dataset and
attachments that are made publicly available to all users.
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25">
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
Project template
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Expand Down Expand Up @@ -222,7 +226,7 @@ import SubTitle from '@/components/ui/SubTitle.vue'
cell type, tissue, or organ), or <span class="italic">(ii)</span> for each modification
associated with a single dataset.
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25">
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
Dataset upload
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Expand All @@ -231,6 +235,46 @@ import SubTitle from '@/components/ui/SubTitle.vue'
form to upload attachments. Attaching BAM files to a given dataset allow users to access
read-level information.
</p>
<p class="indent-4 text-lg underline underline-offset-8 decoration-gb-4/25 font-semibold">
Dataset upload errors
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
Data must be formatted according to the latest
<a
class="text-primary-500 hover:text-secondary-500"
href="https://dieterich-lab.github.io/scimodom/bedrmod.html"
target="_blank"
rel="noopener noreferrer"
>bedRMod format specification</a
>. Pay particular attention to the header, which must meet strict requirements. Most
errors are due to a badly formatted header, or a mismatch between a header tag, value pair
and a corresponding value that you entered when filling the upload form. Most of these
errors can be resolved quickly without the need to contact us.
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
If you get a
<span class="italic">File upload failed. Too many skipped records</span> error, this is
generally due one of the following:
</p>
<div class="pl-8">
<ul class="list-disc">
<li>wrong format for chromosome (1st column)</li>
<li>too many contigs/scaffolds (only chromosomes are used)</li>
<li>wrong modification name (4th column)</li>
<li>mismatch between the modification name (4th column) and that chosen at upload</li>
<li>too many rows with undefined strand (6th column)</li>
<li>
too many rows with out-of-range values for score (5th column) or frequency (11th
column)
</li>
</ul>
</div>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-2">
If you get a <span class="italic">Liftover failed</span> error, it is likely that your
data could not be lifted over (too many unmapped records). Since your data has by then
been validated for organism, assembly, missing records, <span class="italic">etc.</span>,
this is unlikely to happen. Please contact us.
</p>
</div>
</SectionLayout>
</DefaultLayout>
Expand Down
7 changes: 5 additions & 2 deletions client/src/views/UploadView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ import AttachBamForm from '@/components/upload/AttachBamForm.vue'
<Divider />

<p class="indent-4 text-lg leading-relaxed mt-2 mb-4 dark:text-white/80">
During upload you need to select the project to which your dataset belongs. If there is no
project yet for this dataset, create one with the
To upload a bedRMod file, you need to select the project to which your dataset belongs. If
there is no project yet for this dataset, create one with the
<RouterLink :to="{ name: 'project' }" class="text-primary-500 hover:text-secondary-500">
project template request
<i class="pi pi-arrow-up-right -ml-4 text-sm" />
</RouterLink>
</p>
<p class="indent-4 text-lg leading-relaxed mt-2 mb-4 dark:text-white/80">
To attach files to a dataset, first upload a dataset.
</p>
<TabView>
<TabPanel>
<template #header>
Expand Down
5 changes: 2 additions & 3 deletions server/src/scimodom/api/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ def is_true(value):
except NoRecordsFoundError:
return {
"message": (
"File upload failed. No records were found. Allowed formats are BED6 or bedRMod, "
"chromosomes must use the Ensembl short format, contigs are discarded. For more "
"information, consult the documentaion."
"File upload failed. No records were found. Allowed formats are BED6 or bedRMod. "
"For more information, consult the documentation."
)
}, 500
else:
Expand Down

0 comments on commit 28dd9ae

Please sign in to comment.