-
Notifications
You must be signed in to change notification settings - Fork 572
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
More changes for 'samtools depad' #6
Conversation
…le in a padded reference
The latest commits add command line switches for SAM support as well as BAM support in 'samtools depad'. Currently I have left the default as BAM to BAM, and used -s and -S for switching the output and input to SAM (following the case convention used in 'samtools view'). I don't mind changing this is you prefer something different. |
The next batch of commits supports a (padded) FASTA reference file being given via the command line switch -T Making this mandatory would allow us to fix the reference lengths in the headers, otherwise that would require two passes over the SAM/BAM file, the first just to get and correct the padded to unpadded reference lengths. |
I have code working now to calculate the unpadded reference lengths using the padded FASTA reference file (on a new branch, depad2). Without this, as noted above, we could use two passes over the SAM/BAM file is there is an embedded reference. The proposed BAI extension to make finding the embedded reference from the index would make this much easier. The next step is to update the plain text SAM header (changing the @sq lines to edit the LN entry and if present the MD5 checksum). |
Hi Heng,
I've worked on the handling of superfluous CIGAR P operators
in 'samtools depad', and found and fixed a buffer overflow when
CIGAR D operators are used.
I also realized you were right originally not to accept CIGAR P
operators in the input padded reference BAM file (much like it
does not make sense to use CIGAR I in this case either), and
restored that check.
Peter