mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-07-18 17:40:45 +00:00
Add a new test on obisummary
This commit is contained in:
9
obitests/obitools/obisummary/some_uniq_seq.fasta
Normal file
9
obitests/obitools/obisummary/some_uniq_seq.fasta
Normal file
@@ -0,0 +1,9 @@
|
||||
>Seq_1 {"count":2,"merged_sample":{"15a_F730814":1,"29a_F260619":1}}
|
||||
ttagccctaaacacaagtaattaatataacaaaattattcgccagagtactaccggcaat
|
||||
agctyaaaactcaaaggacttggcggtgctttataccctt
|
||||
>Seq_2 {"count":22,"merged_sample":{"15a_F730814":12,"29a_F260619":10}}
|
||||
ttagccctaaacacaagtaattaatataacaaaattattcgccagagtactaccggcaat
|
||||
atcttaaaactcaaaggacttggcggtgctttataccctt
|
||||
>Seq_3 {"count":22,"merged_sample":{"15a_F730814":15,"29a_F260619":7}}
|
||||
ttagccctaaacacaagtaattaatataacaaaattattcgccagagtactaccggcgat
|
||||
agcttaaaactcaaaggacttggcggtgctttataccctt
|
35
obitests/obitools/obisummary/some_uniq_seq.json
Normal file
35
obitests/obitools/obisummary/some_uniq_seq.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"annotations": {
|
||||
"keys": {
|
||||
"map": {
|
||||
"merged_sample": 3
|
||||
},
|
||||
"scalar": {
|
||||
"count": 3
|
||||
}
|
||||
},
|
||||
"map_attributes": 1,
|
||||
"scalar_attributes": 1,
|
||||
"vector_attributes": 0
|
||||
},
|
||||
"count": {
|
||||
"reads": 46,
|
||||
"total_length": 300,
|
||||
"variants": 3
|
||||
},
|
||||
"samples": {
|
||||
"sample_count": 2,
|
||||
"sample_stats": {
|
||||
"15a_F730814": {
|
||||
"reads": 28,
|
||||
"singletons": 1,
|
||||
"variants": 3
|
||||
},
|
||||
"29a_F260619": {
|
||||
"reads": 18,
|
||||
"singletons": 1,
|
||||
"variants": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
25
obitests/obitools/obisummary/some_uniq_seq.yaml
Normal file
25
obitests/obitools/obisummary/some_uniq_seq.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
annotations:
|
||||
keys:
|
||||
map:
|
||||
merged_sample: 3
|
||||
scalar:
|
||||
count: 3
|
||||
map_attributes: 1
|
||||
scalar_attributes: 1
|
||||
vector_attributes: 0
|
||||
count:
|
||||
reads: 46
|
||||
total_length: 300
|
||||
variants: 3
|
||||
samples:
|
||||
sample_count: 2
|
||||
sample_stats:
|
||||
15a_F730814:
|
||||
reads: 28
|
||||
singletons: 1
|
||||
variants: 3
|
||||
29a_F260619:
|
||||
reads: 18
|
||||
singletons: 1
|
||||
variants: 3
|
||||
|
@@ -98,6 +98,49 @@ else
|
||||
((failed++))
|
||||
fi
|
||||
|
||||
((ntest++))
|
||||
if obisummary "${TEST_DIR}/some_uniq_seq.fasta" \
|
||||
> "${TMPDIR}/some_uniq_seq.json"
|
||||
then
|
||||
log "$MCMD: formating json execution OK"
|
||||
((success++))
|
||||
else
|
||||
log "$MCMD: formating json execution failed"
|
||||
((failed++))
|
||||
fi
|
||||
|
||||
((ntest++))
|
||||
if diff "${TEST_DIR}/some_uniq_seq.json" \
|
||||
"${TMPDIR}/some_uniq_seq.json" > /dev/null
|
||||
then
|
||||
log "$MCMD: formating json OK"
|
||||
((success++))
|
||||
else
|
||||
log "$MCMD: formating json failed"
|
||||
((failed++))
|
||||
fi
|
||||
|
||||
((ntest++))
|
||||
if obisummary --yaml "${TEST_DIR}/some_uniq_seq.fasta" \
|
||||
> "${TMPDIR}/some_uniq_seq.yaml"
|
||||
then
|
||||
log "$MCMD: formating yaml execution OK"
|
||||
((success++))
|
||||
else
|
||||
log "$MCMD: formating yaml execution failed"
|
||||
((failed++))
|
||||
fi
|
||||
|
||||
((ntest++))
|
||||
if diff "${TEST_DIR}/some_uniq_seq.yaml" \
|
||||
"${TMPDIR}/some_uniq_seq.yaml" > /dev/null
|
||||
then
|
||||
log "$MCMD: formating yaml OK"
|
||||
((success++))
|
||||
else
|
||||
log "$MCMD: formating yaml failed"
|
||||
((failed++))
|
||||
fi
|
||||
|
||||
#########################################
|
||||
#
|
||||
|
Reference in New Issue
Block a user