<div dir="ltr">A couple points:<div><br></div><div>If you&#39;re using a virtualenv you have to activate prior to other commands and when you want to use it again from a fresh terminal. I really recommend using pip for the install as well. Once the khmer project is installed that way you can run the scripts just like any other command.</div>

<div><br></div><div>The &#39;-R&#39; option to normalize-by-median is for specifying the filename of a report file. According to what I see in your email you specify the same filename as your main input file. In my tests this causes the input file to be erased, which is a bug.</div>

<div><br></div><div>The kept sequences from normalize-by-median.py are saved to a file in the current directory with the same filename as the input but with &quot;.keep&quot; appended. This is likely the source of the error you see.</div>

<div><br></div><div>Here is my suggested variation:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">```</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">

<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">curl -O <a href="https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz" target="_blank">https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz</a><br>

</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">tar xzf virtualenv*<br></span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">python2.7 virtualenv*/virtualenv.py khmerEnv<br>

</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">source khmerEnv/bin/activate<br></span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">pip2 install khmer</span></div>

<div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">cd </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">/work/efraim/output/</span></div>

<div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">interleave-reads.py trimmed_</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">R1_001.fasta trimmed_</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">R2_001.fasta &gt; </span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">trimmed_R.fasta</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">normalize-by-median.py -k 20 -N 4 -x 2e9 -C 20 -p trimmed_R.fasta -R trimmed_R.keep.report</div></div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">

# output will be in /work/efraim/output/trimmed_R.fasta.keep</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">```</span><br></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">Cheers,</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 7, 2014 at 12:37 AM, Efraim Rodrigues <span dir="ltr">&lt;<a href="mailto:efraimnaassom@gmail.com" target="_blank">efraimnaassom@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Okay, here it goes.</div><div><div><br></div><div>python interleave-reads.py /work/efraim/output/trimmed_R1_001.fasta /work/efraim/output/trimmed_R2_001.fasta &gt; /work/efraim/khmer/output/trimmed_R.fasta</div>


<div><br></div><div>python normalize-by-median.py -k 20 -N 4 -x 2e9 -C 20 -p /work/efraim/khmer/output/trimmed_R.fasta -R /work/efraim/khmer/output/normalized_R.fasta</div></div><div><br></div><div>Unfortunately, I am still getting the same error. This is the output from the scripts interleave-reads.py and normalize-by-median.py:</div>


<div><br></div><div><div><br></div><div>|| This is the script &#39;interleave-reads.py&#39; in khmer.</div><div>|| You are running khmer version 1.1</div><div>|| You are also using screed version 0.7</div><div>||</div><div>


|| If you use this script in a publication, please cite EACH of the following:</div><div>||</div><div>||   * MR Crusoe et al., 2014. doi: 10.6084/m9.figshare.979190</div><div>||</div><div>|| Please see the CITATION file for details.</div>


<div><br></div><div>Interleaving:</div><div><span style="white-space:pre-wrap">        </span>/work/efraim/output/trimmed_R1_001.fasta</div><div><span style="white-space:pre-wrap">        </span>/work/efraim/output/trimmed_R2_001.fasta</div>


<div>... 0 pairs</div><div>... 100000 pairs</div><div>... 200000 pairs</div><div>... 300000 pairs</div><div>... 400000 pairs</div><div>... 500000 pairs</div><div>... 600000 pairs</div><div>... 700000 pairs</div><div>... 800000 pairs</div>


<div>... 900000 pairs</div><div>... 1000000 pairs</div><div>... 1100000 pairs</div><div>... 1200000 pairs</div><div>... 1300000 pairs</div><div>... 1400000 pairs</div><div>... 1500000 pairs</div><div>... 1600000 pairs</div>


<div>... 1700000 pairs</div><div>... 1800000 pairs</div><div>... 1900000 pairs</div><div>... 2000000 pairs</div><div>... 2100000 pairs</div><div>... 2200000 pairs</div><div>... 2300000 pairs</div><div>... 2400000 pairs</div>


<div>... 2500000 pairs</div><div>... 2600000 pairs</div><div>... 2700000 pairs</div><div>... 2800000 pairs</div><div>... 2900000 pairs</div><div>... 3000000 pairs</div><div>... <a href="tel:3100000" value="+13100000" target="_blank">3100000</a> pairs</div>

<div>... 3200000 pairs</div>
<div>... 3300000 pairs</div><div>... 3400000 pairs</div><div>... 3500000 pairs</div><div>... 3600000 pairs</div><div>... 3700000 pairs</div><div>... 3800000 pairs</div><div>... 3900000 pairs</div><div>... 4000000 pairs</div>


<div>final: interleaved 4026442 pairs</div><div><br></div><div>|| This is the script &#39;normalize-by-median.py&#39; in khmer.</div><div>|| You are running khmer version 1.1</div><div>|| You are also using screed version 0.7</div>


<div>||</div><div>|| If you use this script in a publication, please cite EACH of the following:</div><div>||</div><div>||   * MR Crusoe et al., 2014. doi: 10.6084/m9.figshare.979190</div><div>||   * CT Brown et al., arXiv:1203.4802 [q-bio.GN]</div>


<div>||</div><div>|| Please see the CITATION file for details.</div><div><br></div><div><br></div><div>PARAMETERS:</div><div> - kmer size =    20 <span style="white-space:pre-wrap">                </span>(-k)</div><div> - n tables =     4 <span style="white-space:pre-wrap">                </span>(-N)</div>


<div> - min tablesize = 2e+09 <span style="white-space:pre-wrap">        </span>(-x)</div><div><br></div><div>Estimated memory usage is 8e+09 bytes (n_tables x min_tablesize)</div><div>--------</div><div>Traceback (most recent call last):</div>


<div>  File &quot;normalize-by-median.py&quot;, line 5, in &lt;module&gt;</div><div>    pkg_resources.run_script(&#39;khmer==1.1&#39;, &#39;normalize-by-median.py&#39;)</div><div>  File &quot;build/bdist.linux-x86_64/egg/pkg_resources.py&quot;, line 534, in run_script</div>


<div>  File &quot;build/bdist.linux-x86_64/egg/pkg_resources.py&quot;, line 1434, in run_script</div><div>  File &quot;/home/efraim/.local/lib/python2.7/site-packages/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/normalize-by-median.py&quot;, line 312, in &lt;module&gt;</div>


<div>    main()</div><div>  File &quot;/home/efraim/.local/lib/python2.7/site-packages/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/normalize-by-median.py&quot;, line 243, in main</div><div>    outfp = open(output_name, &#39;w&#39;)</div>


<div>IOError: [Errno 30] Read-only file system: &#39;normalized_R.fasta.keep&#39;</div></div><div><br></div><div>Thank you!</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">

On Sun, Jul 6, 2014 at 11:11 PM, Michael R. Crusoe <span dir="ltr">&lt;<a href="mailto:mcrusoe@msu.edu" target="_blank">mcrusoe@msu.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If you could include the exact command (with parameters) that is causing the problem and which directory you run it in that would be useful.</div>


<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 7, 2014 at 12:09 AM, Efraim Rodrigues <span dir="ltr">&lt;<a href="mailto:efraimnaassom@gmail.com" target="_blank">efraimnaassom@gmail.com</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Alright! Awesome! <div><br></div><div>I am sorry guys, I did not see that the newest version was the 1.11.6.</div>




<div><br></div><div>Well, &#39;make test&#39; worked and the result was &#39;OK&#39;. </div><div>
<br></div><div>I&#39;m going back to the initial problem which was <span style="font-family:arial,sans-serif;font-size:12.727272033691406px">error  IOError: [Errno 30] Read-only file system: . I&#39;ll try to run it again and I&#39;ll let you guys know about the result.</span></div>





<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Thanks one more time and I&#39;m sorry about not getting the newest version.</span></div>





</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 6, 2014 at 11:01 PM, Michael R. Crusoe <span dir="ltr">&lt;<a href="mailto:mcrusoe@msu.edu" target="_blank">mcrusoe@msu.edu</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The lack of `pip2` when installed this way is fixed in the latest virtualenv release (1.11.6):<div><br>




</div>
<div>```<br><span style="color:rgb(0,0,0)">curl -O <a href="https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz" target="_blank">https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz</a><br>







</span><span style="color:rgb(0,0,0)">tar xzf virtualenv*<br></span><span style="color:rgb(0,0,0)">python2.7 virtualenv*/virtualenv.py khmerEnv<br></span><span style="color:rgb(0,0,0)">source khmerEnv/bin/activate<br></span><span style="color:rgb(0,0,0)">pip2 --version<br>







</span><span style="color:rgb(0,0,0)">```</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Sun, Jul 6, 2014 at 11:11 PM, C. Titus Brown <span dir="ltr">&lt;<a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a>&gt;</span> wrote:<br>







</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div>On Sun, Jul 06, 2014 at 10:09:20PM -0500, Efraim Rodrigues wrote:<br>
&gt; When I try to run &#39;make test&#39;. It looks like it calls a script which runs<br>
&gt; pip2. I guess I cannot change it.<br>
&gt;<br>
&gt; Oh, do not feel sorry. You guys are willing to help and that&#39;s all that<br>
&gt; matters.<br>
<br>
</div>well, thanks ;)<br>
<br>
You can do:<br>
<br>
        ln &lt;virtualenv&gt;/bin/pip &lt;virtualenv&gt;/bin/pip2<br>
<br>
where you replace &lt;virtualenv&gt; with the path to your virtualenv directory.<br>
<br>
cheers,<br>
--titus<br>
<div><div><br>
&gt; On Sun, Jul 6, 2014 at 10:01 PM, C. Titus Brown &lt;<a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Just try pip (not pip2). Sorry for all the mess :(<br>
&gt; &gt;<br>
&gt; &gt; On Jul 6, 2014, at 7:53 PM, Efraim Rodrigues &lt;<a href="mailto:efraimnaassom@gmail.com" target="_blank">efraimnaassom@gmail.com</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi. Thanks for your response.<br>
&gt; &gt;<br>
&gt; &gt; It looks like the we are supposed to choose the version of the virtualenv.<br>
&gt; &gt; I found all the versions here<br>
&gt; &gt; <a href="https://pypi.python.org/packages/source/v/virtualenv/" target="_blank">https://pypi.python.org/packages/source/v/virtualenv/</a> so I am followed<br>
&gt; &gt; these steps using the newest version of the virtualen, in this case, I<br>
&gt; &gt; believe that is,<br>
&gt; &gt; <a href="https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.tar.gz" target="_blank">https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.tar.gz</a><br>
&gt; &gt;<br>
&gt; &gt; Anyway, I ran all the tests and it still returns the same problem.<br>
&gt; &gt;<br>
&gt; &gt;  make test<br>
&gt; &gt; pip2 install --user nose || pip2 install nose<br>
&gt; &gt; /bin/sh: pip2: command not found<br>
&gt; &gt; /bin/sh: pip2: command not found<br>
&gt; &gt; make: *** [test] Error 127<br>
&gt; &gt;<br>
&gt; &gt; In fact, there is no pip2 inside khmerEnv. I can just see these files:<br>
&gt; &gt;<br>
&gt; &gt; activate      activate.fish     easy_install      pip      python<br>
&gt; &gt; python2.7<br>
&gt; &gt; activate.csh  activate_this.py  easy_install-2.7  pip-2.7  python2<br>
&gt; &gt;<br>
&gt; &gt; Should I try another version of virutalenv or perhaps another similar tool?<br>
&gt; &gt;<br>
&gt; &gt; Thank y&#39;all for trying to help me.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Sun, Jul 6, 2014 at 5:25 PM, C. Titus Brown &lt;<a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; On Sat, Jul 05, 2014 at 03:01:47PM -0500, Efraim Rodrigues wrote:<br>
&gt; &gt;&gt; &gt; Hi everyone,<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Actually, when I tried to install by running &#39;make test&#39;, it returned<br>
&gt; &gt;&gt; the<br>
&gt; &gt;&gt; &gt; following message:<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; pip2 install --user nose || pip2 install nose<br>
&gt; &gt;&gt; &gt; /bin/sh: pip2: command not found<br>
&gt; &gt;&gt; &gt; /bin/sh: pip2: command not found<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Even though we have python/2.7 installed, It looks like my system has<br>
&gt; &gt;&gt; &gt; python/2.6 as default. Hence, in order to install &#39;khmer&#39;, I followed<br>
&gt; &gt;&gt; these<br>
&gt; &gt;&gt; &gt; steps:<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; module load python/2.7<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; python setup.py install --user<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Apparently, it worked to install it locally, however I&#39;m not sure about<br>
&gt; &gt;&gt; any<br>
&gt; &gt;&gt; &gt; additional file or module.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; OK, I would suggest running the tests inside of virtualenv.  try:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; curl -O<br>
&gt; &gt;&gt; <a href="https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.x.y.tar.gz" target="_blank">https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.x.y.tar.gz</a><br>
&gt; &gt;&gt; tar xzf virtualenv*<br>
&gt; &gt;&gt; cd virtualenv-*; python2.7 virtualenv.py ../khmerEnv; cd ..<br>
&gt; &gt;&gt; source khmerEnv/bin/activate<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; and then &#39;make test&#39;.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; thanks!<br>
&gt; &gt;&gt; --titus<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
<br>
</div></div><div>--<br>
C. Titus Brown, <a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a><br>
<br>
</div></div></div><div><div><div>_______________________________________________<br>
khmer mailing list<br>
<a href="mailto:khmer@lists.idyll.org" target="_blank">khmer@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/khmer" target="_blank">http://lists.idyll.org/listinfo/khmer</a><br>
</div></div></div></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><span style="font-family:&#39;courier new&#39;,monospace;font-size:small">Michael R. Crusoe:  Programmer &amp; Bioinformatician   </span><a href="mailto:mcrusoe@msu.edu" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">mcrusoe@msu.edu</a><br style="font-family:&#39;courier new&#39;,monospace;font-size:small">







<span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> @ the Genomics, Evolution, and Development lab; Michigan State U</span><br style="font-family:&#39;courier new&#39;,monospace;font-size:small"><a href="http://ged.msu.edu/" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">http://ged.msu.edu/</a><span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> </span><a href="http://orcid.org/0000-0002-2961-9670" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">http://orcid.org/0000-0002-2961-9670</a><span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> </span><a href="http://twitter.com/biocrusoe" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">@biocrusoe</a><br>







</div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><span style="font-family:&#39;courier new&#39;,monospace;font-size:small">Michael R. Crusoe:  Programmer &amp; Bioinformatician   </span><a href="mailto:mcrusoe@msu.edu" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">mcrusoe@msu.edu</a><br style="font-family:&#39;courier new&#39;,monospace;font-size:small">




<span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> @ the Genomics, Evolution, and Development lab; Michigan State U</span><br style="font-family:&#39;courier new&#39;,monospace;font-size:small"><a href="http://ged.msu.edu/" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">http://ged.msu.edu/</a><span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> </span><a href="http://orcid.org/0000-0002-2961-9670" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">http://orcid.org/0000-0002-2961-9670</a><span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> </span><a href="http://twitter.com/biocrusoe" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">@biocrusoe</a><br>




</div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><span style="font-family:&#39;courier new&#39;,monospace;font-size:small">Michael R. Crusoe:  Programmer &amp; Bioinformatician   </span><a href="mailto:mcrusoe@msu.edu" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">mcrusoe@msu.edu</a><br style="font-family:&#39;courier new&#39;,monospace;font-size:small">

<span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> @ the Genomics, Evolution, and Development lab; Michigan State U</span><br style="font-family:&#39;courier new&#39;,monospace;font-size:small"><a href="http://ged.msu.edu/" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">http://ged.msu.edu/</a><span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> </span><a href="http://orcid.org/0000-0002-2961-9670" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">http://orcid.org/0000-0002-2961-9670</a><span style="font-family:&#39;courier new&#39;,monospace;font-size:small"> </span><a href="http://twitter.com/biocrusoe" style="color:rgb(17,85,204);font-family:&#39;courier new&#39;,monospace;font-size:small" target="_blank">@biocrusoe</a><br>

</div>
</div>