Skip to content

BWA-MEM support - #1790

Merged
peterjc merged 19 commits into
biopython:masterfrom
JohnMCMa:bwa_mem
Oct 4, 2018
Merged

peterjc merged 19 commits into
biopython:masterfrom
JohnMCMa:bwa_mem

Conversation

@JohnMCMa

Copy link
Copy Markdown
Contributor

This pull request addresses issue #1756.

It adds a new class BwaSampeCommandline to Bio.Sequencing.Applications._bwa.py as a wrapper to bwa mem with usage similar to the other classes in the file. I also added an unittest, test_mem, for BwaSampeCommandline.

The code has been tested under python 3.6.1 and style-checked using flake8 and pre-commit hooks.

  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file and understand that AppVeyor and
    TravisCI will be used to confirm the Biopython unit tests and flake8 style
    checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

Adding BWA-MEM support in Bio.Sequencing.Applications

Adding a new class BwaMemCommandline to Bio.Sequencing.Applications._bwa to act as a wrapper for BWA-MEM. Test code is also added to this new class.
Minor Bugfixes to BWA

Fixed: redudent option declaration in BwaMemCommandline
Bugfix and Stylistic Edits to BWA-MEM test

* FIX: corrected a wrong parameter name that causes test failure
* The test for BwaMemCommandline is renamed from test_sammem to test_mem, owing to the fact that the BWA-MEM operation never includes "sam" in its name.
Renaming argument names in BwaMemCommandline

Renaming read_file to read_file1 and mate_file to read_file2, following BwaSampeCommandline conventions.
Renaming arguments for test_mem

Renaming arguments used in test_mem to agree with BwaMemCommandline.
Removing empty spaces causing a flake8 warning.
Adding name to CONTRIB.rst per guideline
Comment thread Bio/Sequencing/Applications/_bwa.py Resolved
@peterjc

peterjc commented Sep 14, 2018

Copy link
Copy Markdown
Member

It looks like the automated testing got stuck due to the merge conflict. Are you familiar with using git rebase origin/master?

Comment thread .pre-commit-config.yaml Resolved
The file only involves pre-commit hooks and is not necessary in production code.
Add a blank line before every doctest block in rst blocks to ensure functionality
Removing 2 lines that causes launch conflict.
Edits to comply with pydocstyle codes D412 and W293.
@peterjc

peterjc commented Sep 14, 2018

Copy link
Copy Markdown
Member

It looks like the blank lines before each doctest broke an automated style check - right now the original style is working within epydoc, e.g. http://biopython.org/DIST/docs/api/Bio.Sequencing.Applications._samtools.SamtoolsViewCommandline-class.html looks fine.

Maybe I was mis-remembering a related problem, or is is specific to using Sphinx (which we don't yet do but are looking at using instead)?

Sorry about that confusion.

This reverts commit 9a0f80a.
Fixing a argument bug at the doctest of BwaMemCommandline
@JohnMCMa

Copy link
Copy Markdown
Contributor Author

@peterjc
I reverted any edits on NEWS.rst to handle any merge conflict issues and moved on to other edits based on your recommendation. I will handle the conflict when I get to a workstation that I can safely use commandline git.

@peterjc

peterjc commented Sep 17, 2018

Copy link
Copy Markdown
Member

Looks good to me - @saketkc could you take a quick look at this for us please?

@saketkc

saketkc commented Sep 17, 2018

Copy link
Copy Markdown
Contributor

Is it possible to keep the help string text to 80 characters as well? The original _bwa.py also doesn't enforce this. In hindsight I should have kept it to 80 characters, happy to send a separate PR for that.

Looks good to me otherwise! Thanks @JohnMCMa!

@peterjc

peterjc commented Oct 4, 2018

Copy link
Copy Markdown
Member

OK, I'll merge this as is - looking at the line lengths can come later.

@peterjc
peterjc merged commit d52fe0f into biopython:master Oct 4, 2018
@peterjc

peterjc commented Oct 4, 2018

Copy link
Copy Markdown
Member

Thank you both 👍

peterjc added a commit to peterjc/biopython that referenced this pull request Nov 15, 2020
Original author Saket Choudhary and contributors
since as tracked by version control have agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Jeremy LaBarge (@biojerm)
   biopython#1847 (comment)
 - John Ma (@JohnMCMa)
   biopython#1790
 - @morrme
   biopython#1172 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Saket Choudhary (@saketkc)
   biopython#898 (comment)
 - Sergei Lebedev (@superbobry)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430
 - Travis Wrightsman (@twrightsman)
   biopython#898 (comment)
peterjc added a commit to peterjc/biopython that referenced this pull request Nov 16, 2020
peterjc added a commit to peterjc/biopython that referenced this pull request Nov 16, 2020
peterjc added a commit that referenced this pull request Nov 17, 2020
Original author Saket Choudhary and contributors
since as tracked by version control have agreed:

 - Adhemar Zerlotini (@azneto)
   #1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   #2444
 - Carlos Pena (@carlosp420)
   #898 (comment)
 - Chris Daley (@chebizarro)
   #2349
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Jeremy LaBarge (@biojerm)
   #1847 (comment)
 - John Ma (@JohnMCMa)
   #1790
 - @morrme
   #1172 (comment)
 - Peter Cock (@peterjc)
   #898 (comment)
 - Saket Choudhary (@saketkc)
   #898 (comment)
 - Sergei Lebedev (@superbobry)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
 - Sujan Dulal (@Dsujan)
   #2430
 - Travis Wrightsman (@twrightsman)
   #898 (comment)
peterjc added a commit that referenced this pull request Nov 17, 2020
Original author Osvaldo Zagordi and the contributors
since as tracked by version control have agreed:

 - Brad Chapman (@chapmanb)
   http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html
 - Brian Osborne (@bosborne)
   #898 (comment)
 - Carlos Pena (@carlosp420)
   #898 (comment)
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - John Ma (@JohnMCMa)
   #1790
 - Osvaldo Zagordi (@ozagordi)
   #3365
 - Peter Cock (@peterjc)
   #898 (comment)
 - Saket Choudhary (@saketkc)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
 - Veronika Berman (@NikiB)
   #927 (comment)
JoaoRodrigues pushed a commit to JoaoRodrigues/biopython that referenced this pull request Jun 3, 2021
Original author Saket Choudhary and contributors
since as tracked by version control have agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Jeremy LaBarge (@biojerm)
   biopython#1847 (comment)
 - John Ma (@JohnMCMa)
   biopython#1790
 - @morrme
   biopython#1172 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Saket Choudhary (@saketkc)
   biopython#898 (comment)
 - Sergei Lebedev (@superbobry)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430
 - Travis Wrightsman (@twrightsman)
   biopython#898 (comment)
JoaoRodrigues pushed a commit to JoaoRodrigues/biopython that referenced this pull request Jun 3, 2021
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.

3 participants