[khmer] Extracting kmer sequences from khmer output
C. Titus Brown
ctbrown at ucdavis.edu
Tue Sep 22 13:09:36 PDT 2015
Hi Damion,
either should work, but the latter is maybe slightly easier?
The key thing is to make sure you're getting the sandbox/ scripts from
the right version of khmer. For example, for version 2.0, you'd want
to grab sandbox scripts from
https://github.com/dib-lab/khmer/tree/v2.0
or equivalently do
git clone https://github.com/dib-lab/khmer.git -b v2.0
best,
--titus
On Tue, Sep 22, 2015 at 12:05:42PM -0700, Dooley, Damion wrote:
> Hi folks,
>
> I think my previous install a few months ago suffered from one point - we'd used the suggested virtualenv pip install khmer to get a standard install, but discovered that part or all of the /sandbox/ folder didn't show up in that. So I did a separate direct github install which included sandbox, but which didn't compile c code successfully. I wasn't sure if that was important or not (i.e. precompiled c binaries already in place?)
>
> Long and short of it: should I be doing a python 2.7 virtualenv, loading up the latest github master, and resolving any "make" issues (i didn't see a ./configure file so is there other necessary config there?); or should I install via standard pip approach and copy the sandbox folder in separately?
>
> Thanks for the info,
>
> Damion
>
> Hsiao lab, BC Public Health Microbiology & Reference Laboratory, BC Centre for Disease Control
> 655 West 12th Avenue, Vancouver, British Columbia, V5Z 4R4 Canada
> ________________________________________
> From: C. Titus Brown [ctbrown at ucdavis.edu]
> Sent: Tuesday, September 22, 2015 11:31 AM
> To: Miller, Ruth
> Cc: titus at idyll.org; khmer at lists.idyll.org; Dooley, Damion
> Subject: Re: [khmer] Extracting kmer sequences from khmer output
>
> Hi Ruth,
>
> this indicates a version mismatch - the script is from khmer 2.0, but
> the khmer library that it is importing is from your previous intsallation.
>
> Try doing
>
> python -c "import khmer; print khmer"
>
> to see where the default khmer import is. You might need to set your
> PYTHONPATH variable to point at the directory above 'khmer/__init__.py'
> for 2.0.
>
> best,
> --titus
>
> On Tue, Sep 22, 2015 at 11:27:15AM -0700, Miller, Ruth wrote:
> > Hi,
> >
> > Thanks for getting back to me. I am glad that this functionality is
> > available.
> > I downloaded count-kmers.py, but I am having some problems, because it
> > seems to require a module that I don?t have, namely load_countgraph,
> > because I get the error:
> >
> > hashtable from kmers.g
> > Traceback (most recent call last):
> > File "/usr/local/packages/khmer/khmer/sandbox/count-kmers.py", line 105,
> > in <module>
> > main()
> > File "/usr/local/packages/khmer/khmer/sandbox/count-kmers.py", line 79,
> > in main
> > countgraph = khmer.load_countgraph(
> > AttributeError: 'module' object has no attribute ?load_countgraph'
> >
> >
> > I have downloaded the latest version of khmer, so I don?t think that is
> > the problem. And I can?t see a script called load_countgraph in the
> > sandbox downloads. Is load_countgraph available somewhere?
> >
> > Thanks,
> >
> > Ruth
> >
> > On 2015-09-19, 6:08 AM, "C. Titus Brown" <ctbrown at ucdavis.edu> wrote:
> >
> > >On Fri, Sep 18, 2015 at 03:25:39PM -0700, Miller, Ruth wrote:
> > >> Hi,
> > >>
> > >> I am hoping to get a list of the sequence of each kmer identified from
> > >>my dataset and it?s abundance. This would allow me to compare the
> > >>abundance of different kmers in my sample set, to see whether certain
> > >>samples cluster together based on the abundance of kmers present.
> > >>
> > >> Is there a way to do this in khmer?
> > >>
> > >> Thanks,
> > >>
> > >> Ruth
> > >
> > >Hi Ruth,
> > >
> > >yep! In khmer 2.0 we've added the 'count-kmers.py' and
> > >'count-kmers-single.py'
> > >scripts in the sandbox/ directory; you can either do
> > >
> > > load-into-counting.py kmers.g file1.fq file2.fq file3.fq ...
> > > sandbox/count-kmers.py kmers.g file1.fq
> > >
> > >if you have multiple files, or
> > >
> > > sandbox/count-kmers-single.py file1.fq
> > >
> > >The graph size parameters (-M, or -x / -N) still apply for setting the
> > >size of the kmer countgraph database; see
> > >
> > > http://khmer.readthedocs.org/en/v2.0/user/choosing-table-sizes.html
> > >
> > >for more info.
> > >
> > >Now, the other problem is that count-kmers.py/count-kmers-single.py aren't
> > >installed with 'pip install khmer' because they're not yet part of the
> > >supported scripts. So you'll need to grab them from the URLs below,
> > >
> > >https://github.com/dib-lab/khmer/blob/master/sandbox/count-kmers.py
> > >https://github.com/dib-lab/khmer/blob/master/sandbox/count-kmers-single.py
> > >
> > >(click 'Raw' to download the text file) *or* check out the git repository
> > >and call them from sandbox.
> > >
> > >Let me know if you have any problems --
> > >
> > >best,
> > >--titus
> > >--
> > >C. Titus Brown, ctbrown at ucdavis.edu
> >
>
> --
> C. Titus Brown, ctbrown at ucdavis.edu
--
C. Titus Brown, ctbrown at ucdavis.edu
More information about the khmer
mailing list