Sourcetracker running error

125 views
Skip to first unread message

Michal

unread,
Oct 16, 2014, 3:50:13 PM10/16/14
to qiime...@googlegroups.com
Hi,

I'm trying to run sourcetracker with the following script:

R --slave --vanilla --args -i filtered_otu_table_2OTUs.txt -m USB.map.Day6.txt -o sourcetracker_out < $SOURCETRACKER_PATH/sourcetracker_for_qiime.r


I am getting the following error:

Error: Please add SOURCETRACKER_PATH environment variable pointing to the SourceTracker top-level directory (containing 'sourcetracker_for_qiime.r')
Execution halted


I believe I do have a SOURCETRACKER_PATH environmental variable as indicated.  I checked this by entering the following:

michal@biolinux-01: echo "$SOURCETRACKER_PATH"
/home/michal/Projects/Scripts/sourcetracker-0.9.5/

It is also in my $PATH.

What else could be going wrong?

Thanks very much for your help,

Michal


Dan Knights

unread,
Oct 24, 2014, 10:53:36 PM10/24/14
to qiime...@googlegroups.com
Hi Michal,

I agree, it does look like you have the right environment variable set. Would you mind opening R (enter "R" and the command line), and then running this command? Then please send the output.

Sys.getenv('SOURCETRACKER_PATH')

Thanks,

Dan

Michal Ziv-El

unread,
Oct 27, 2014, 10:10:49 AM10/27/14
to qiime...@googlegroups.com
Hi Dan,

Thanks for getting back to me on this.  Here is the output for Sys.getenv('SOURCETRACKER_PATH'):

[1] ""

--

---
You received this message because you are subscribed to a topic in the Google Groups "Qiime Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qiime-forum/zYBGAiGeI_M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qiime-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Knights

unread,
Oct 28, 2014, 9:19:32 AM10/28/14
to qiime...@googlegroups.com
For some reason R isn't seeing your environment variables. What happens when you run your command explicitly setting the env variable with this?

env SOURCETRACKER_PATH='/home/michal/Projects/Scripts/sourcetracker-0.9.5/' R --slave --vanilla --args -i filtered_otu_table_2OTUs.txt -m USB.map.Day6.txt -o sourcetracker_out < $SOURCETRACKER_PATH/sourcetracker_for_qiime.r

or for a simpler test, this?

echo "print(Sys.getenv('TESTVAR2')); q()" | env TESTVAR2='Hello world' R --no-save --vanilla

The second command should print "Hello world" (plus maybe some R startup output).

Michal Ziv-El

unread,
Oct 28, 2014, 10:23:22 AM10/28/14
to qiime...@googlegroups.com
Hi Dan,

The 'Hello World' test worked right away.  For sourcetracker, the script you listed did not initially work.  Then I reset SOURCETRACKER as an environmental variable and reran what you listed, and this time it worked!

Is there some setting I should change so that I don't need to use this work-around?

Thanks,

Michal

Reply all
Reply to author
Forward
0 new messages