Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADAM-410] Alphabet model #653

Closed
wants to merge 1 commit into from

Conversation

bryanjj
Copy link
Contributor

@bryanjj bryanjj commented Apr 19, 2015

I was interested in contributing to this project and learning scala.
I am attempting to partially address #410

I created a new alphabet class which operates on symbols. I based the functionality on the existing SequenceUtils class which supports the following functionality:

  1. basic DNA symbols
  2. case-insensitivity
  3. reverse complement function which leaves unknown chars unchanged

My main concerns with this pull request are

  1. I'm just learning scala so might be doing something dumb
  2. I'm not sure which package this class should go in
  3. I think performance should be ok because the String map function uses a StringBuilder internally, but not sure about overhead on case class creation or exception handling for unknown characters
  4. This issue also mentions "ambiguity codes", but I'm not sure what they are but should be able to add later if they're needed

this is my first github contribution ever so let me know what you think

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@massie
Copy link
Member

massie commented Apr 19, 2015

Jenkins, add to whitelist and test this please.

@AmplabJenkins
Copy link

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

* if false, this alphabet will treat upper or lower case chars as the same for its symbols
*
*/
val caseSensitive: Boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@fnothaft
Copy link
Member

+1, this is good code. Thanks for the contribution @bryanjj! I left a few comments inline, but I think we can merge this soon. As a small nit, can you squash the commits down into a single commit, and prefix that commit with [ADAM-410]?

@bryanjj
Copy link
Contributor Author

bryanjj commented Apr 30, 2015

Thanks for the comments! I will make the changes and see how it looks

@AmplabJenkins
Copy link

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

Build result: FAILURE

GitHub pull request #653 of commit e99cf7e automatically merged.Notifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'[EnvInject] - Loading node environment variables.Building remotely on amp-jenkins-worker-05 (centos) in workspace /home/jenkins/workspace/ADAM-prb > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/bigdatagenomics/adam.git # timeout=10Fetching upstream changes from https://github.com/bigdatagenomics/adam.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/653/merge^{commit} # timeout=10 > git branch -a --contains 4e16fab7c8b7a4cded7d6adbd83792df38f9b06b # timeout=10 > git rev-parse remotes/origin/pr/653/merge^{commit} # timeout=10Checking out Revision 4e16fab7c8b7a4cded7d6adbd83792df38f9b06b (origin/pr/653/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 4e16fab7c8b7a4cded7d6adbd83792df38f9b06bFirst time build. Skipping changelog.Triggering ADAM-prb ? 1.0.4,centosTriggering ADAM-prb ? 2.2.0,centosTriggering ADAM-prb ? 2.3.0,centosADAM-prb ? 1.0.4,centos completed with result FAILUREADAM-prb ? 2.2.0,centos completed with result FAILUREADAM-prb ? 2.3.0,centos completed with result FAILURENotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

…cs#410

removed the SequenceUtils class and updated all references.  ran mvn verify and all tests pass.

ran ./scripts/format-source

make changes as suggested in the pull request:
1. unknown characters should throw illegalArgumentException instead of keyNotFound
2. case-insensitive changed to mean that it will map both lower and upper case characters to the same symbol instead of mapping lower to lower and upper to upper

clean up import

squashed commits
@AmplabJenkins
Copy link

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

@AmplabJenkins
Copy link

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

Build result: FAILURE

GitHub pull request #653 of commit dda0a17 automatically merged.Notifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'[EnvInject] - Loading node environment variables.Building remotely on amp-jenkins-worker-05 (centos) in workspace /home/jenkins/workspace/ADAM-prb > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/bigdatagenomics/adam.git # timeout=10Fetching upstream changes from https://github.com/bigdatagenomics/adam.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/653/merge^{commit} # timeout=10 > git branch -a --contains 793320a # timeout=10 > git rev-parse remotes/origin/pr/653/merge^{commit} # timeout=10Checking out Revision 793320a (origin/pr/653/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 793320a9b6763b0ba6a5d63f842f7da0f6ba88cdFirst time build. Skipping changelog.Triggering ADAM-prb ? 1.0.4,centosTriggering ADAM-prb ? 2.2.0,centosTriggering ADAM-prb ? 2.3.0,centosADAM-prb ? 1.0.4,centos completed with result SUCCESSADAM-prb ? 2.2.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,centos completed with result FAILURENotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

@bryanjj
Copy link
Contributor Author

bryanjj commented Apr 30, 2015

I addressed the comments. Please let me know what you think.

After the squash, the build succeeded for hadoop 1.0 and 2.2 but failed for 2.3 I'm not sure if it's related to my change or something random.

@fnothaft
Copy link
Member

fnothaft commented May 1, 2015

Jenkins, retest this please.

@AmplabJenkins
Copy link

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

@fnothaft
Copy link
Member

fnothaft commented May 1, 2015

@laserson @tdanford any thoughts on this? I would like to merge by Monday for the 0.17.0 release.

@fnothaft
Copy link
Member

fnothaft commented May 4, 2015

Thanks @bryanjj! I've rebased and manually merged via 6ce4ef7.

@fnothaft fnothaft closed this May 4, 2015
@laserson laserson changed the title ADAM issue #410 [ADAM-410] Alphabet model May 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants