Skip to content

Commit

Permalink
Update table stats selection
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisLeNezet committed Mar 26, 2024
1 parent b11bd7c commit 7f205d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ All channel need to be identified by a meta map as follow:
- T : tool used
- G : reference genome used (is it needed ?)
- S : simulation (depth or genotype array)

## Open questions

How to use different schema ?
Expand Down
7 changes: 6 additions & 1 deletion modules/local/addcolumns/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ process ADD_COLUMNS {
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
awk '(NR>=2) && (NR<=10)' $input | \\
# Find the header line
HEADER_STR="#Genotype concordance by allele frequency bin (Variants: SNPs + indels)"
HEADER_LINE=\$(grep -n -m 1 "^\${HEADER_STR}" $input | cut -d: -f1 )
HEADER_START=\$((HEADER_LINE + 1))
tail -n +\$HEADER_START $input | \\
awk 'NR==1{\$(NF+1)="ID"} NR>1{\$(NF+1)="${meta.id}"}1' | \\
awk 'NR==1{\$(NF+1)="Region"} NR>1{\$(NF+1)="${meta.region}"}1' | \\
awk 'NR==1{\$(NF+1)="Depth"} NR>1{\$(NF+1)="${meta.depth}"}1' | \\
Expand Down
16 changes: 3 additions & 13 deletions subworkflows/local/vcf_concordance_glimpse/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,13 @@
"content": [
{
"0": [
[
{
"id": "TestQuality"
},
"TestQuality.txt:md5,910b294df62dbe64e8f16379428d93ad"
]

],
"1": [

],
"stats": [
[
{
"id": "TestQuality"
},
"TestQuality.txt:md5,910b294df62dbe64e8f16379428d93ad"
]

],
"versions": [

Expand All @@ -30,6 +20,6 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-03-25T12:44:54.967846019"
"timestamp": "2024-03-26T10:07:33.413253799"
}
}

0 comments on commit 7f205d0

Please sign in to comment.