Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing humann2.jl #53

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/files/humanntestfile.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#GeneFamily SRS014459-Stool_Abundance
UniRef50_unknown|g__Parabacteroides|s__Parabacteroides_distasonis 24.94925526
UniRef50_unknown|g__Bacteroides|s__Bacteroides_cellulosilyticus 21.90659622
UniRef50_unknown|g__Bacteroides|s__Bacteroides_stercoris 14.12141848
UniRef50_unknown|g__Eubacterium|s__Eubacterium_rectale 8.044842004
UniRef50_B3C5F2 37.03703704
UNMAPPED 15961
UniRef50_A9FGD2: 50S ribosomal protein L36 111.1111111
UniRef50_A9FGD2: 50S ribosomal protein L36|g__Bacteroides.s__Bacteroides_cellulosilyticus 111.1111111
UniRef50_unknown 69.02211197
10 changes: 10 additions & 0 deletions test/files/metadata_test_humann.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sampleID,ageYears,gender,collectionDate
sample1,0.2,male,2020-01-01
sample3,1.3,female,2020-02-01
sample4,2,female,2021-03-02
sample5,5,,2021-04-03
sample6,,male,2021-05-30
sample7,3.6,male,
sample8,2.14,female,2021-07-01
sample9,3.5,male,2021-08-01
sample10,1.4,female,2021-09-01
9 changes: 9 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ using SparseArrays
using DelimitedFiles
using CSV

@testset "Humann2" begin
df = CSV.read("files/humanntestfile.tsv", DataFrame, delim='\t', header=["#GeneFamily", "SRS014459-Stool_Abundance"], datarow = 2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably have a function like metaphlan_table<s> but for humann instead of this at some point, but deal with that later #23

metadata = CSV.File("files/metadata_test_humann.csv") |> Tables.Array
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't actually any tests here... should at least test the type and shape of the object created.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep running into this error when I run humann2_regroup and humann2_rename

ERROR: IOError: could not spawn humann2_rename_table -i /var/folders/jm/_25dbvt53_793g7w_1975c5c0000gn/T/jl_ahMrMf -n ec -o /var/folders/jm/_25dbvt53_793g7w_1975c5c0000gn/T/jl_afnvCf: no such file or directory (ENOENT)

Do you know how I can resolve this?

# @test humann2_regroup(df) ==
# @test humann2_rename(df) ==
# @test humann2_barplots(df, metadata) ==
# @test humann2_barplot(df, metadata) ==
end

@testset "Metaphlan" begin
taxstring = "k__Archaea|p__Euryarchaeota|c__Methanobacteria|o__Methanobacteriales|f__Methanobacteriaceae|g__Methanobrevibacter|s__Methanobrevibacter_smithii"
taxa = parsetaxa(taxstring)
Expand Down