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

feature request: include sequences #3

Closed
timodonnell opened this issue May 21, 2021 · 7 comments · Fixed by #4
Closed

feature request: include sequences #3

timodonnell opened this issue May 21, 2021 · 7 comments · Fixed by #4

Comments

@timodonnell
Copy link
Contributor

Thanks for a great library. It would be very helpful as a general purpose tool if bamread.read_bam_full had the ability to include the query sequences.

@endrebak
Copy link
Collaborator

Do you know the relevant functions in pysam? I’ll look into it. Thanks for the suggestion.

@timodonnell
Copy link
Contributor Author

I haven't looked at your code but if you are using AlignedSegment, then query_sequence should give it to you https://pysam.readthedocs.io/en/latest/api.html#pysam.AlignedSegment.query_sequence

@endrebak
Copy link
Collaborator

I'll look into it. Will probably have lots of time Monday 👍

@endrebak endrebak reopened this May 21, 2021
timodonnell added a commit to timodonnell/bamread that referenced this issue May 21, 2021
@timodonnell
Copy link
Contributor Author

Noticed that this was just a one line change, so I just submitted a PR now #4

@endrebak
Copy link
Collaborator

Here is some code that needs changing too: https://github.com/pyranges/bamread/blob/master/bamread/src/bamread.pyx

I'll do it, but do you have an example bam I could use?

@timodonnell
Copy link
Contributor Author

I don't think anything else needs changing. I've been using the branch with my PR to read in sequences without any other changes. Here's an example BAM, in case it's helpful: https://github.com/openvax/varlens/blob/master/test/data/rna_chr17_41244936.bam

@endrebak
Copy link
Collaborator

endrebak commented Jun 9, 2021

Looking at this now. I've had lots to do - sorry for being tardy!

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 a pull request may close this issue.

2 participants