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

Add bam filtering on fragment length script #544

Merged
merged 10 commits into from Sep 11, 2020
Merged

Add bam filtering on fragment length script #544

merged 10 commits into from Sep 11, 2020

Conversation

maxibor
Copy link
Member

@maxibor maxibor commented Sep 4, 2020

Add bam filtering on fragment length script

PR checklist

  • This comment contains a description of changes (with reason)
  • If you've fixed a bug or added code that should be tested, add tests!
  • If necessary, also make a PR on the nf-core/eager branch on the nf-core/test-datasets repo
  • Ensure the test suite passes (nextflow run . -profile test,docker --paired_end).
  • Make sure your code lints (nf-core lint .).
  • Documentation in docs is updated
  • CHANGELOG.md is updated
  • README.md is updated

Learn more about contributing: CONTRIBUTING.md

@jfy133
Copy link
Member

jfy133 commented Sep 4, 2020

Thanks @maxibor ! @apeltzer this is hopefully to replace the shaky awk hack I have... will look next week.

@drpatelh
Copy link
Member

drpatelh commented Sep 4, 2020

Nice 👍

@apeltzer
Copy link
Member

apeltzer commented Sep 5, 2020

Doesn't add the script to the nextflow code no? We need to test this ;-)

@jfy133
Copy link
Member

jfy133 commented Sep 5, 2020

Doesn't add the script to the nextflow code no? We need to test this ;-)

That's the plan, don't worry!

Copy link
Member

@jfy133 jfy133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only issue I can see is that: during testing, -a seems to do nothing.

(samtools) sos@dat4903339:10:28:bwa:(dev)$ samtools stats filtered_py_ohneA.filtered.bam | grep ^FRL | cut -f 2- | head
31	2
32	2
33	2
34	4
35	1
36	4
37	4
38	5
39	4
40	8
(samtools) sos@dat4903339:10:28:bwa:(dev)$ samtools stats filtered_py_withA.filtered.bam | grep ^FRL | cut -f 2- | head
31	2
32	2
33	2
34	4
35	1
36	4
37	4
38	5
39	4
40	8

@jfy133 jfy133 mentioned this pull request Sep 10, 2020
8 tasks
@maxibor
Copy link
Member Author

maxibor commented Sep 10, 2020

This should now include unmapped reads https://pysam.readthedocs.io/en/latest/api.html#pysam.AlignmentFile.fetch

@jfy133 jfy133 self-requested a review September 11, 2020 07:52
Copy link
Member

@jfy133 jfy133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me now, thanks @maxibor! Will merge and make a new PR to replace the awk, and hopefully this makes CI more stable 💪

@jfy133 jfy133 merged commit 249d5f4 into nf-core:dev Sep 11, 2020
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 this pull request may close these issues.

None yet

4 participants