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

Adding ADAM to SAM conversion. #250

Merged
merged 3 commits into from Jun 2, 2014

Conversation

Projects
None yet
6 participants
@fnothaft
Member

fnothaft commented May 29, 2014

This commit adds a conversion function for going from ADAM back to SAM or BAM. This work was done by @erictu; I've just gone ahead and rebased it on top of master, and done some small clean up. This resolves #49.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/330/

AmplabJenkins commented May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/330/

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/331/

AmplabJenkins commented May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/331/

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 29, 2014

Member

@tdanford I've just updated to generate the header before we do the record conversion.

I have also rebased, because, y'know.

Member

fnothaft commented May 29, 2014

@tdanford I've just updated to generate the header before we do the record conversion.

I have also rebased, because, y'know.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/338/

AmplabJenkins commented May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/338/

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/339/

AmplabJenkins commented May 29, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/339/

@tdanford

This comment has been minimized.

Show comment
Hide comment
@tdanford

tdanford May 29, 2014

Contributor

@fnothaft I just filed a PR to your feature branch, with (what I think is) a failing test... let me know if you think that's a valid test or not, though.

Contributor

tdanford commented May 29, 2014

@fnothaft I just filed a PR to your feature branch, with (what I think is) a failing test... let me know if you think that's a valid test or not, though.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 30, 2014

Member

Thanks @tdanford; I believe your failing test is a valid test, and I will review and fix.

Member

fnothaft commented May 30, 2014

Thanks @tdanford; I believe your failing test is a valid test, and I will review and fix.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins commented May 30, 2014

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/340/

erictu and others added some commits Mar 16, 2014

Adding failing test for SAM->ADAM round-trip
Adding a round-trip test which fails (at the moment) with an NPE -- I *think* this is
related to the failure to write out the RG tags?
@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft May 30, 2014

Member

@tdanford I've fixed the failing test, and have also cleaned up the other items you noted.

Member

fnothaft commented May 30, 2014

@tdanford I've fixed the failing test, and have also cleaned up the other items you noted.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 30, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/341/

AmplabJenkins commented May 30, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/341/

@@ -26,25 +31,35 @@ import org.bdgenomics.adam.avro.{
ADAMRecord,
ADAMNucleotideContigFragment
}
import org.bdgenomics.adam.converters.ADAMRecordConverter

This comment has been minimized.

@massie

massie May 30, 2014

Member

Unused import

@massie

massie May 30, 2014

Member

Unused import

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins May 31, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/342/

AmplabJenkins commented May 31, 2014

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM-prb/342/

*/
package org.bdgenomics.adam.util
import fi.tkk.ics.hadoop.bam.{ KeyIgnoringBAMOutputFormat, SAMFormat }

This comment has been minimized.

@tdanford

tdanford Jun 1, 2014

Contributor

"SAMFormat" is unused.

@tdanford

tdanford Jun 1, 2014

Contributor

"SAMFormat" is unused.

*/
package org.bdgenomics.adam.util
import fi.tkk.ics.hadoop.bam.{ KeyIgnoringAnySAMOutputFormat, SAMFormat }

This comment has been minimized.

@tdanford

tdanford Jun 1, 2014

Contributor

"SAMFormat" is unused (sez IntelliJ)

@tdanford

tdanford Jun 1, 2014

Contributor

"SAMFormat" is unused (sez IntelliJ)

import fi.tkk.ics.hadoop.bam.{ SAMRecordWritable, AnySAMInputFormat }
import fi.tkk.ics.hadoop.bam.util.SAMHeaderReader
import java.util.regex.Pattern
import net.sf.samtools.{ SAMFileHeader }

This comment has been minimized.

@massie

massie Jun 2, 2014

Member

No need for braces here.

@massie

massie Jun 2, 2014

Member

No need for braces here.

import org.apache.spark.{ SparkConf, Logging, SparkContext }
import org.apache.spark.rdd.RDD
import org.apache.spark.scheduler.StatsReportListener
import org.bdgenomics.adam.util.{ ADAMSAMOutputFormat, ADAMBAMOutputFormat, HadoopUtil }

This comment has been minimized.

@massie

massie Jun 2, 2014

Member

ADAMSAMOutputFormat and ADAMBamOutputFormat are not used.

@massie

massie Jun 2, 2014

Member

ADAMSAMOutputFormat and ADAMBamOutputFormat are not used.

package org.bdgenomics.adam.rdd
import fi.tkk.ics.hadoop.bam.{ SAMRecordWritable, AnySAMInputFormat }

This comment has been minimized.

@massie

massie Jun 2, 2014

Member

AnySAMInputFormat is not used.

@massie

massie Jun 2, 2014

Member

AnySAMInputFormat is not used.

package org.bdgenomics.adam.rdd
import fi.tkk.ics.hadoop.bam.{ SAMRecordWritable, AnySAMInputFormat }
import fi.tkk.ics.hadoop.bam.util.SAMHeaderReader

This comment has been minimized.

@massie

massie Jun 2, 2014

Member

Unused import

@massie

massie Jun 2, 2014

Member

Unused import

import java.util.logging.Level
import net.sf.samtools.{ SAMRecord, SAMFileHeader }

This comment has been minimized.

@massie

massie Jun 2, 2014

Member

SAMRecord is not used.

@massie

massie Jun 2, 2014

Member

SAMRecord is not used.

import parquet.avro.{ AvroParquetOutputFormat, AvroWriteSupport }
import parquet.hadoop.ParquetOutputFormat
import parquet.hadoop.metadata.CompressionCodecName
import parquet.hadoop.util.ContextUtil
import scala.math.max
import scala.math.{ min, max }

This comment has been minimized.

@massie

massie Jun 2, 2014

Member

min is not used.

@massie

massie Jun 2, 2014

Member

min is not used.

@massie

This comment has been minimized.

Show comment
Hide comment
@massie

massie Jun 2, 2014

Member

I'm going to just merge this as is and then followup with a pull request to clean up our import statements.

Member

massie commented Jun 2, 2014

I'm going to just merge this as is and then followup with a pull request to clean up our import statements.

massie added a commit that referenced this pull request Jun 2, 2014

Merge pull request #250 from fnothaft/adam2sam
Adding ADAM to SAM conversion.

@massie massie merged commit 178feb6 into bigdatagenomics:master Jun 2, 2014

1 check passed

default Merged build finished.
Details
@massie

This comment has been minimized.

Show comment
Hide comment
@massie

massie Jun 2, 2014

Member

Thanks, Frank!

Member

massie commented Jun 2, 2014

Thanks, Frank!

@fnothaft fnothaft deleted the fnothaft:adam2sam branch Jul 10, 2014

@ankushreddy

This comment has been minimized.

Show comment
Hide comment
@ankushreddy

ankushreddy Jan 26, 2016

how to perform adam actions to convert from .adam file format to bam file.

ankushreddy commented Jan 26, 2016

how to perform adam actions to convert from .adam file format to bam file.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Jan 26, 2016

Member

@ankushreddy you'll want to do:

./bin/adam-submit transform [<optional spark config> -- ] myFile.adam myFile.bam
Member

fnothaft commented Jan 26, 2016

@ankushreddy you'll want to do:

./bin/adam-submit transform [<optional spark config> -- ] myFile.adam myFile.bam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment