You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Validates certain INSDC record curation metadata.
5
+
Summary: |
6
+
Validates certain INSDC record curation metadata.
7
+
- fastqc files
8
+
- experiment accession annotation is present and correct
9
+
- descends from a correctly named sample
10
+
MajorVersion: 0
11
+
MinorVersion: 0
12
+
PatchVersion: 1
13
+
Publish: true
14
+
Authors:
15
+
- FullName: Kevin Schneider
16
+
Affiliation: DataPLANT
17
+
Tags:
18
+
- Name: INSDC
19
+
- Name: Metadata curation
20
+
ReleaseNotes: |
21
+
- fastqc process graph validation
22
+
---
23
+
*)"""
24
+
25
+
#r "nuget: ARCtrl"
26
+
#r "nuget: ARCtrl.QueryModel, 3.0.0-alpha.4"
27
+
#r "nuget: ARCExpect.Core, 7.0.0-alpha"
28
+
#r "nuget: FsHttp"
29
+
#r "nuget: FSharpAux"
30
+
#r "nuget: FSharpAux.IO"
31
+
32
+
openARCtrl
33
+
openARCtrl.QueryModel
34
+
openARCExpect
35
+
openFsHttp
36
+
openFSharpAux.IO.SchemaReader
37
+
openExpecto
38
+
openSystem.IO
39
+
openSystem
40
+
41
+
letarcDir= Directory.GetCurrentDirectory()
42
+
43
+
letarc=
44
+
try ARC.load arcDir with
45
+
|_-> ARC(identifier ="unable to load arc from this dir")
46
+
47
+
letproject_accession= arc.Identifier
48
+
49
+
moduleDomain =
50
+
51
+
openFSharpAux.IO.SchemaReader.Attribute
52
+
openSystem.Collections.Generic
53
+
54
+
/// represents the relations provided by ENA portal API in TSV form
55
+
typeINSDC_Relations={
56
+
[<FieldAttribute("study_accession")>]
57
+
study_accession:string
58
+
[<FieldAttribute("sample_accession")>]
59
+
sample_accession:string
60
+
[<FieldAttribute("experiment_accession")>]
61
+
experiment_accession:string
62
+
[<FieldAttribute("run_accession")>]
63
+
run_accession:string
64
+
[<FieldAttribute("fastq_ftp")>]
65
+
fastq_ftp:string
66
+
}
67
+
68
+
/// Some records map from sample to multiple fastq files in a single line (e.g., paired end reads). This function splits such records into multiple records, one for each fastq file.
69
+
letsplitByFastq(r:INSDC_Relations)=
70
+
match r.fastq_ftp.Split(';')|> Array.filter (fun s -> s <>"")with
71
+
|[||]->[ r ]// no fastq → keep row as-is
72
+
| files ->[for f in files ->{ r with fastq_ftp = f }]
73
+
74
+
/// lookup index for retrieving INSDC_Relations by any of the accession numbers or fastq file name. Last-wins in case of duplicates.
GET $"https://www.ebi.ac.uk/ena/portal/api/filereport?accession={project_accession}&result=read_run&fields=study_accession,sample_accession,experiment_accession,run_accession,tax_id,scientific_name,fastq_ftp,submitted_ftp,bam_ftp&format=tsv&download=true&limit=0"
0 commit comments