generated from bokulich-lab/q2-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: move partitioning and collating actions to q2-types (#175)
- Loading branch information
1 parent
e1ae7f1
commit b56f64b
Showing
41 changed files
with
72 additions
and
731 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
q2_moshpit/busco/tests/data/busco_results/collated/busco_results.tsv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mag_id sample_id input_file dataset complete single duplicated fragmented missing n_markers scaffold_n50 contigs_n50 percent_gaps scaffolds length | ||
bec9c09a-62c3-4fbb-8f7f-9fdf9aefc02f SRR13221817 bec9c09a-62c3-4fbb-8f7f-9fdf9aefc02f.fasta bacteria_odb10 28.2 27.4 0.8 8.9 62.9 124 4785 4785 0.000% 265 1219165 | ||
5978e667-0476-4921-8cc2-34b9d1b508c1 SRR13221817 5978e667-0476-4921-8cc2-34b9d1b508c1.fasta bacteria_odb10 1.6 1.6 0.0 1.6 96.8 124 3548 3548 0.000% 67 245922 | ||
625c95e6-ac2f-4e6e-9470-af8cd11c75dd SRR13221817 625c95e6-ac2f-4e6e-9470-af8cd11c75dd.fasta bacteria_odb10 26.6 26.6 0.0 3.2 70.2 124 78679 78679 0.000% 17 714893 | ||
6ed8c097-1c87-4019-8b38-b95507011b41 SRR14143412 6ed8c097-1c87-4019-8b38-b95507011b41.fasta bacteria_odb10 8.1 8.1 0.0 0.8 91.1 124 74198 74198 0.000% 11 560715 | ||
bf2c0af0-83ba-44a6-b550-3b7884a62a82 SRR14143412 bf2c0af0-83ba-44a6-b550-3b7884a62a82.fasta bacteria_odb10 95.9 93.5 2.4 2.4 1.7 124 80820 80820 0.000% 92 4253319 | ||
a2401d15-802f-42c3-9eb4-c282e2141b14 SRR14143412 a2401d15-802f-42c3-9eb4-c282e2141b14.fasta bacteria_odb10 89.5 89.5 0.0 1.6 8.9 124 31708 31708 0.000% 106 2120157 |
4 changes: 4 additions & 0 deletions
4
q2_moshpit/busco/tests/data/busco_results/sample1/busco_results.tsv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mag_id sample_id input_file dataset complete single duplicated fragmented missing n_markers scaffold_n50 contigs_n50 percent_gaps scaffolds length | ||
bec9c09a-62c3-4fbb-8f7f-9fdf9aefc02f SRR13221817 bec9c09a-62c3-4fbb-8f7f-9fdf9aefc02f.fasta bacteria_odb10 28.2 27.4 0.8 8.9 62.9 124 4785 4785 0.000% 265 1219165 | ||
5978e667-0476-4921-8cc2-34b9d1b508c1 SRR13221817 5978e667-0476-4921-8cc2-34b9d1b508c1.fasta bacteria_odb10 1.6 1.6 0.0 1.6 96.8 124 3548 3548 0.000% 67 245922 | ||
625c95e6-ac2f-4e6e-9470-af8cd11c75dd SRR13221817 625c95e6-ac2f-4e6e-9470-af8cd11c75dd.fasta bacteria_odb10 26.6 26.6 0.0 3.2 70.2 124 78679 78679 0.000% 17 714893 |
4 changes: 4 additions & 0 deletions
4
q2_moshpit/busco/tests/data/busco_results/sample2/busco_results.tsv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mag_id sample_id input_file dataset complete single duplicated fragmented missing n_markers scaffold_n50 contigs_n50 percent_gaps scaffolds length | ||
6ed8c097-1c87-4019-8b38-b95507011b41 SRR14143412 6ed8c097-1c87-4019-8b38-b95507011b41.fasta bacteria_odb10 8.1 8.1 0.0 0.8 91.1 124 74198 74198 0.000% 11 560715 | ||
bf2c0af0-83ba-44a6-b550-3b7884a62a82 SRR14143412 bf2c0af0-83ba-44a6-b550-3b7884a62a82.fasta bacteria_odb10 95.9 93.5 2.4 2.4 1.7 124 80820 80820 0.000% 92 4253319 | ||
a2401d15-802f-42c3-9eb4-c282e2141b14 SRR14143412 a2401d15-802f-42c3-9eb4-c282e2141b14.fasta bacteria_odb10 89.5 89.5 0.0 1.6 8.9 124 31708 31708 0.000% 106 2120157 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Copyright (c) 2022-2023, QIIME 2 development team. | ||
# | ||
# Distributed under the terms of the Modified BSD License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
# ---------------------------------------------------------------------------- | ||
import os | ||
|
||
import pandas as pd | ||
from qiime2.plugin.testing import TestPluginBase | ||
|
||
from q2_moshpit.busco.partition import collate_busco_results | ||
from q2_moshpit.busco.types import BUSCOResultsDirectoryFormat | ||
|
||
|
||
class TestBUSCOPlots(TestPluginBase): | ||
package = "q2_moshpit.busco.tests" | ||
|
||
def test_collate_busco_results(self): | ||
p1 = self.get_data_path("busco_results/sample1") | ||
p2 = self.get_data_path("busco_results/sample2") | ||
|
||
busco_results = [ | ||
BUSCOResultsDirectoryFormat(p1, mode="r"), | ||
BUSCOResultsDirectoryFormat(p2, mode="r") | ||
] | ||
|
||
collated_busco_result = collate_busco_results(busco_results) | ||
|
||
obs = pd.read_csv( | ||
os.path.join(str(collated_busco_result), "busco_results.tsv")) | ||
exp = pd.read_csv( | ||
self.get_data_path("busco_results/collated/busco_results.tsv")) | ||
|
||
pd.testing.assert_frame_equal(obs, exp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.