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

Add fragmentEndPosition to NucleotideContigFragment #1030

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@heuermh
Member

heuermh commented May 10, 2016

Follows bigdatagenomics/bdg-formats#79

Shouldn't be merged until bdg-formats version 0.7.2 is released.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 10, 2016

Member

+1! Thanks for leading this up @heuermh.

Member

fnothaft commented May 10, 2016

+1! Thanks for leading this up @heuermh.

@@ -214,6 +214,7 @@ private[converters] class FastaConverter(fragmentLength: Long) extends Serializa
.setFragmentSequence(bases)
.setFragmentNumber(index)
.setFragmentStartPosition(index * fragmentLength)
.setFragmentEndPosition(index * fragmentLength + bases.length - 1L)

This comment has been minimized.

@fnothaft

fnothaft May 10, 2016

Member

It doesn't look like we check this further up in the code, but it might be reasonable to have an assert checking that either:

  1. The length of the sequence equals the fragmentLength (bases.length == fragmentLength), or
  2. The fragment is the last fragment of the sequence (fragmentCount == index).
@fnothaft

fnothaft May 10, 2016

Member

It doesn't look like we check this further up in the code, but it might be reasonable to have an assert checking that either:

  1. The length of the sequence equals the fragmentLength (bases.length == fragmentLength), or
  2. The fragment is the last fragment of the sequence (fragmentCount == index).

This comment has been minimized.

@heuermh

heuermh Jun 3, 2016

Member

The method parameters have already gone through mapFragments(sequence)

@heuermh

heuermh Jun 3, 2016

Member

The method parameters have already gone through mapFragments(sequence)

This comment has been minimized.

@fnothaft

fnothaft Jun 3, 2016

Member

Ah OK!

@fnothaft

fnothaft Jun 3, 2016

Member

Ah OK!

Show outdated Hide outdated .../main/scala/org/bdgenomics/adam/rdd/contig/FlankReferenceFragments.scala
f._2.setFragmentStartPosition(f._2.getFragmentStartPosition - flankSize.toLong)
// and the end position of the fragment we are appending to
copyLastFragment._2.setFragmentEndPosition(copyLastFragment._2.getFragmentStartPosition + copyLastFragment._2.getFragmentSequence.length - 1L)

This comment has been minimized.

@fnothaft

fnothaft May 10, 2016

Member

Wrap line?

@fnothaft

fnothaft May 10, 2016

Member

Wrap line?

@@ -57,8 +57,10 @@ private[contig] object FlankReferenceFragments extends Serializable {
f._2.setFragmentSequence(lastSequence.takeRight(flankSize) + currSequence)
f._2.setDescription("f")
// we must change the start position of the fragment we are appending in front of
// we must change the start position of the fragment we are prepending to

This comment has been minimized.

@fnothaft

fnothaft May 10, 2016

Member

You don't think "appending in front of" is a clear way to say "prepending"? ;)

@fnothaft

fnothaft May 10, 2016

Member

You don't think "appending in front of" is a clear way to say "prepending"? ;)

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 10, 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/1228/
Test PASSed.

AmplabJenkins commented May 10, 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/1228/
Test PASSed.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 18, 2016

Member

I have cut a bdg-formats 0.8.0 release. This will show up in Maven Central, probably this afternoon.

In terms of sequencing, I think we will need to update #1015 first, with changes to the genotype loading/conversion code. I can do this. Then, we can merge this PR.

Member

fnothaft commented May 18, 2016

I have cut a bdg-formats 0.8.0 release. This will show up in Maven Central, probably this afternoon.

In terms of sequencing, I think we will need to update #1015 first, with changes to the genotype loading/conversion code. I can do this. Then, we can merge this PR.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Jun 3, 2016

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

Build result: FAILURE

[...truncated 24 lines...]Triggering ADAM-prb ? 2.6.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.10,1.5.2,centosTriggering ADAM-prb ? 2.6.0,2.10,1.4.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.5.2,centosTriggering ADAM-prb ? 2.6.0,2.11,1.4.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.4.1,centosTriggering ADAM-prb ? 2.3.0,2.10,1.4.1,centosADAM-prb ? 2.6.0,2.11,1.6.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.10,1.6.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.6.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.4.1,centos completed with result SUCCESSNotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

AmplabJenkins commented Jun 3, 2016

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

Build result: FAILURE

[...truncated 24 lines...]Triggering ADAM-prb ? 2.6.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.10,1.5.2,centosTriggering ADAM-prb ? 2.6.0,2.10,1.4.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.5.2,centosTriggering ADAM-prb ? 2.6.0,2.11,1.4.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.4.1,centosTriggering ADAM-prb ? 2.3.0,2.10,1.4.1,centosADAM-prb ? 2.6.0,2.11,1.6.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.10,1.6.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.6.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.4.1,centos completed with result SUCCESSNotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Jun 3, 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/1251/
Test PASSed.

AmplabJenkins commented Jun 3, 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/1251/
Test PASSed.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Jun 3, 2016

Member

Ping to @heuermh for small bits of cleanup.

Member

fnothaft commented Jun 3, 2016

Ping to @heuermh for small bits of cleanup.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Jun 3, 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/1253/
Test PASSed.

AmplabJenkins commented Jun 3, 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/1253/
Test PASSed.

@heuermh heuermh modified the milestone: 0.20.0 Jun 5, 2016

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Jun 6, 2016

Member

Thanks @heuermh! Merged as dbf0ec5 and d386468.

Member

fnothaft commented Jun 6, 2016

Thanks @heuermh! Merged as dbf0ec5 and d386468.

@fnothaft fnothaft closed this Jun 6, 2016

@heuermh heuermh deleted the heuermh:fragment-end-position branch Jun 6, 2016

@heuermh

This comment has been minimized.

Show comment
Hide comment
@heuermh

heuermh Jun 6, 2016

Member

Thanks!

Member

heuermh commented Jun 6, 2016

Thanks!

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