I'm using Dan Knights original R script to estimate shared OTUs between shorebirds and their feeding environment and keep running into an error with sourcetracker() function which is driving me crazy. Haven't used the package before so not familiar with it. Seems like there isn't much of a forum going on for R queries and it doesn't look like sourcetracker2 can act as an R package... (and I'm not a Python programmer :( ).
Anyway - if anyone recognises the below error please let me know. The sourcetracker() function says it wont work if the otu matrix isn't in integer format, but I've checked and run ceiling() on the matrix and all looks fine, so a bit stumped on the error. Works with the example data though, although can't see any formatting difference between my data and the example data. Have also tried loads of different data formats but always results in same error:
train SourceTracker object on training data
st <- sourcetracker(otus[train.ix,], envs[train.ix], rarefaction_depth = 1000)
ERROR
Error in if (sum(as.integer(train) != as.numeric(train)) > 0) { :
missing value where TRUE/FALSE needed
Data and R files also below if needed. Could just be me missing something obvious... #disclaimer
Can you please post your question to the QIIME1 forum here? They'll be able to answer your question. This repo deals exclusively with the updated Python implementation of SourceTracker2. Thanks!
Hey
I'm using Dan Knights original R script to estimate shared OTUs between shorebirds and their feeding environment and keep running into an error with sourcetracker() function which is driving me crazy. Haven't used the package before so not familiar with it. Seems like there isn't much of a forum going on for R queries and it doesn't look like sourcetracker2 can act as an R package... (and I'm not a Python programmer :( ).
Anyway - if anyone recognises the below error please let me know. The sourcetracker() function says it wont work if the otu matrix isn't in integer format, but I've checked and run ceiling() on the matrix and all looks fine, so a bit stumped on the error. Works with the example data though, although can't see any formatting difference between my data and the example data. Have also tried loads of different data formats but always results in same error:
train SourceTracker object on training data
st <- sourcetracker(otus[train.ix,], envs[train.ix], rarefaction_depth = 1000)
ERROR
Error in if (sum(as.integer(train) != as.numeric(train)) > 0) { :
missing value where TRUE/FALSE needed
Data and R files also below if needed. Could just be me missing something obvious... #disclaimer
Any help appreciated. Cheers
Alice
r_script.txt
metadata1.txt count_table.txt