error in "readTableCF()" - deleterows! not defined

20 views
Skip to first unread message

Marek Šlenker

unread,
Oct 1, 2022, 6:06:39 PM10/1/22
to PhyloNetworks users
Hi,

I matched raxmlCF and astraltree names using mapAllelesCFtable(), and now I want to read tableCF with speciesNames, but I receive this message:

speciesCF = readTableCF("tableCF.astral.speciesNames.csv")
found 47568 4-taxon sets uninformative about between-species relationships, out of 1426425.
These 4-taxon sets will be deleted from the data frame. 1378857 informative 4-taxon sets will be used.
ERROR: UndefVarError: deleterows! not defined
Stacktrace:
 [1] cleanAlleleDF!(newdf::DataFrame, cols::Vector{Int64}; keepOne::Bool)
   @ PhyloNetworks ~/.julia/packages/PhyloNetworks/UNKEe/src/multipleAlleles.jl:176
 [2] cleanAlleleDF!
   @ ~/.julia/packages/PhyloNetworks/UNKEe/src/multipleAlleles.jl:89 [inlined]
 [3] readTableCF!(df::DataFrame, co::Vector{Int64})
   @ PhyloNetworks ~/.julia/packages/PhyloNetworks/UNKEe/src/readData.jl:146
 [4] readTableCF!(df::DataFrame; summaryfile::String)
   @ PhyloNetworks ~/.julia/packages/PhyloNetworks/UNKEe/src/readData.jl:127
 [5] readTableCF(file::String; delim::Char, summaryfile::String)
   @ PhyloNetworks ~/.julia/packages/PhyloNetworks/UNKEe/src/readData.jl:93
 [6] readTableCF(file::String)
   @ PhyloNetworks ~/.julia/packages/PhyloNetworks/UNKEe/src/readData.jl:92
 [7] top-level scope
   @ REPL[286]:1


I looks like DataFrame replaced deleterows! function, with delete!.
When I use readTableCF with individuals, it works, because there aren't any uninformative 4-taxon sets. When it have to remove uninformative ones, it fails.
I am wandering to use workaround, to remove uninformative 4-taxon sets by hand, and read only informative ones. So whitch sets are uninformative? there are some looking like TaxonA,TaxonA,TaxonA,TaxonA   but count of those are much lower than reported 47568 ones.

thanks in advance

Marek Slenker
--
Institute of Botany, SAS, Bratislava, Slovakia

Marek Šlenker

unread,
Oct 3, 2022, 3:09:20 AM10/3/22
to PhyloNetworks users
So, the uninformative 4-taxon sets are those, containing three or more identical species. I can remove these rows by sed, but the bug remains..

e.g.:
sed -i '/.*acris.*acris.*acris/d' tableCF.astral.speciesNames.csv
sed -i '/.*amara.*amara.*amara/d' tableCF.astral.speciesNames.csv

best,

Marek Slenker
--
Institute of Botany, SAS, Bratislava, Slovakia




Dátum: nedeľa 2. októbra 2022, čas: 0:06:39 UTC+2, odosielateľ: Marek Šlenker

Cécile Ané

unread,
Oct 3, 2022, 10:58:10 AM10/3/22
to PhyloNetworks users
Thank you so much for this report Marek!
I fixed the issue in this pull request (#188). A new version of PhyloNetworks will be registered soon after the pull request is merged, to make it easy to get the fix.
While I'm at it, I'm fixing an older issue and improving the documentation for using multiple alleles. I expect the new version to be available tomorrow or so.
Cecile.

Reply all
Reply to author
Forward
0 new messages