diff --git a/obitests/obitools/obisummary/some_uniq_seq.fasta b/obitests/obitools/obisummary/some_uniq_seq.fasta new file mode 100644 index 0000000..651a0f5 --- /dev/null +++ b/obitests/obitools/obisummary/some_uniq_seq.fasta @@ -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 diff --git a/obitests/obitools/obisummary/some_uniq_seq.json b/obitests/obitools/obisummary/some_uniq_seq.json new file mode 100644 index 0000000..a756ab1 --- /dev/null +++ b/obitests/obitools/obisummary/some_uniq_seq.json @@ -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 + } + } + } +} diff --git a/obitests/obitools/obisummary/some_uniq_seq.yaml b/obitests/obitools/obisummary/some_uniq_seq.yaml new file mode 100644 index 0000000..64b0b95 --- /dev/null +++ b/obitests/obitools/obisummary/some_uniq_seq.yaml @@ -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 + diff --git a/obitests/obitools/obisummary/test.sh b/obitests/obitools/obisummary/test.sh index e4d4931..620366f 100755 --- a/obitests/obitools/obisummary/test.sh +++ b/obitests/obitools/obisummary/test.sh @@ -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 ######################################### #