Changes

From Genome Analysis Wiki
Jump to navigationJump to search
404 bytes added ,  11:42, 17 March 2010
no edit summary
Line 3: Line 3:  
== Read & Write BAM/SAM Executable ==
 
== Read & Write BAM/SAM Executable ==
 
When the pipeline is compiled, the sam/bam executable, "bam" is generated in the pipeline/bam/ directory.
 
When the pipeline is compiled, the sam/bam executable, "bam" is generated in the pipeline/bam/ directory.
This executable takes 2 arguments.  The first argument is the input file.  The second argument is the output file.  
+
This executable takes 2 arguments.  The first argument is the input file.  The second argument is the output file. The executable converts the first file into the format of the second file.  So if you want to convert a Bam file to a SAM file, from the pipeline/bam/ directory you just call
From the pipeline/bam/ direcotry:
+
  ./bam <bamFile>.bam <newSamFile>.sam
  ./bam initialBam.bam convertedToSam.sam
   
Don't forget to put in the paths to the executable and your test files.
 
Don't forget to put in the paths to the executable and your test files.
 
+
The software reads the beginning of the input file to determine if it is SAM/BAM.  To determine the format (SAM/BAM) of the output file, the software checks the output file's extension.  If the extension is ".bam" it writes a BAM file, otherwise it writes a SAM file.
    
== Reading/Writing SAM/BAM Files In Your Program ==
 
== Reading/Writing SAM/BAM Files In Your Program ==

Navigation menu