Error in the README.md for kmer.scala example, need to get rdd first. #1032

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
@InvisibleTech
Contributor

InvisibleTech commented May 13, 2016

When I ran the example from the README for kmer.scala I received errors trying to flatMap:

error: value flatMap is not a member of org.bdgenomics.adam.rdd.read.AlignmentRecordRDD

By using .rdd:

reads.rdd.flatMap(_.getSequence.sliding(21).map(k => (k, 1L)))....
It works.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 13, 2016

Can one of the admins verify this patch?

Can one of the admins verify this patch?

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 13, 2016

Member

Jenkins, test this please.

Member

fnothaft commented May 13, 2016

Jenkins, test this please.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 13, 2016

Member

Thanks for the patch, @InvisibleTech! We've just made that API change recently and forgot to patch the docs, so thank you for updating the docs after you ran into the issue!

Member

fnothaft commented May 13, 2016

Thanks for the patch, @InvisibleTech! We've just made that API change recently and forgot to patch the docs, so thank you for updating the docs after you ran into the issue!

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 13, 2016

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1230/
Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1230/
Test PASSed.

@heuermh

This comment has been minimized.

Show comment
Hide comment
@heuermh

heuermh May 13, 2016

Member

@fnothaft shouldn't the implicit take care of this?

Member

heuermh commented May 13, 2016

@fnothaft shouldn't the implicit take care of this?

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 13, 2016

Member

@heuermh good point, I was just thinking that. I think the correct approach would be to add the implicit conversion. We just import import org.bdgenomics.adam.rdd.ADAMContext, not import org.bdgenomics.adam.rdd.ADAMContext._

Member

fnothaft commented May 13, 2016

@heuermh good point, I was just thinking that. I think the correct approach would be to add the implicit conversion. We just import import org.bdgenomics.adam.rdd.ADAMContext, not import org.bdgenomics.adam.rdd.ADAMContext._

@InvisibleTech

This comment has been minimized.

Show comment
Hide comment
@InvisibleTech

InvisibleTech May 15, 2016

Contributor

Got it... I ran the example with the wildcard implicit and it works. Though... not sure if this a Spark 1.6 or OSX Spark thing but if you don't end the code lines for the val kmers = .... line you end up with spark shell errors running the kmer.scala sample. I'll post a new PR for this. thanks for the review... who'd have thought a README review could be so useful.

Contributor

InvisibleTech commented May 15, 2016

Got it... I ran the example with the wildcard implicit and it works. Though... not sure if this a Spark 1.6 or OSX Spark thing but if you don't end the code lines for the val kmers = .... line you end up with spark shell errors running the kmer.scala sample. I'll post a new PR for this. thanks for the review... who'd have thought a README review could be so useful.

@InvisibleTech

This comment has been minimized.

Show comment
Hide comment
@InvisibleTech

InvisibleTech May 16, 2016

Contributor

Please see #1033 for my better fix per your suggestion.

Contributor

InvisibleTech commented May 16, 2016

Please see #1033 for my better fix per your suggestion.

@heuermh

This comment has been minimized.

Show comment
Hide comment
@heuermh

heuermh May 18, 2016

Member

Closing in favor of #1033, thanks!

Member

heuermh commented May 18, 2016

Closing in favor of #1033, thanks!

@heuermh heuermh closed this May 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment