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

saved fasta files incorrectly - Bug fixed #740

Merged
merged 30 commits into from
Oct 22, 2019
Merged

saved fasta files incorrectly - Bug fixed #740

merged 30 commits into from
Oct 22, 2019

Conversation

pranathivemuri
Copy link
Contributor

@pranathivemuri pranathivemuri commented Oct 11, 2019

When saving the fasta files for each unique barcode, I was repeatedly writing the name and the sequence, for the same barcode. I.E the fasta file should have had only one > followed by barcode name. But by using >{}{} barcode inside the loop, for every sequence I was repeating the >barcode. I corrected that in this PR.

I have also updated the comments
And made save_fastas cli argument a boolean

@olgabot @ctb Sorry about the error! not ready for review yet!

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #740 into master will decrease coverage by 0.21%.
The diff coverage is 40.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #740      +/-   ##
==========================================
- Coverage   88.63%   88.41%   -0.22%     
==========================================
  Files          30       30              
  Lines        4777     4783       +6     
  Branches       46       46              
==========================================
- Hits         4234     4229       -5     
- Misses        540      551      +11     
  Partials        3        3
Impacted Files Coverage Δ
sourmash/tenx.py 100% <100%> (+1.04%) ⬆️
sourmash/command_compute.py 76.3% <8.33%> (-2.68%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9a7c3c...a8a4452. Read the comment docs.

@pranathivemuri pranathivemuri changed the title saved fasta files incorrectly [WIP] saved fasta files incorrectly Oct 11, 2019
@pranathivemuri
Copy link
Contributor Author

pranathivemuri commented Oct 11, 2019

there is a test that fails randomly and here is the error - https://travis-ci.com/dib-lab/sourmash/jobs/236306024#L842 1. I ran it locally it passes 2. I went through other branches, it seemed like it failed in those branches randomly as well 3. the travis test passed in this commit a2ef27a and after adding two more lines in test, and no change in program at all, this commit 818e088 it failed. So, I am assuming there is some random thing going on or it doesn't like the generator!

@pranathivemuri
Copy link
Contributor Author

@olgabot @ctb ready for review now!

Copy link
Collaborator

@olgabot olgabot left a comment

Choose a reason for hiding this comment

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

Looks great! I had one comment about adding the option to save fastas to a specific prefix or folder, but I don't think it's necessary for PR approval.

@@ -84,7 +84,7 @@ def compute(args):
parser.add_argument('-p', '--processes', default=2, type=int,
help='For 10x input only (i.e input-is-10x flag is True, '
'Number of processes to use for reading 10x bam file')
parser.add_argument('--save-fastas', type=str,
parser.add_argument('--save-fastas', action='store_true',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome work! Would it be possible to provide a directory or prefix to save all the created fastas to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to take a path instead

@pranathivemuri pranathivemuri changed the title [WIP] saved fasta files incorrectly [WIP] saved fasta files incorrectly - Bug fixed Oct 14, 2019
@pranathivemuri pranathivemuri changed the title [WIP] saved fasta files incorrectly - Bug fixed saved fasta files incorrectly - Bug fixed Oct 15, 2019
@luizirber
Copy link
Member

I opened #755 to discuss coverage for pathos.multiprocessing, I'm going to merge when travis finish running.

@pranathivemuri
Copy link
Contributor Author

test_cmd_signature is failing - https://travis-ci.com/dib-lab/sourmash/jobs/248344113#L536

@luizirber luizirber merged commit 476c704 into sourmash-bio:master Oct 22, 2019
@luizirber
Copy link
Member

Merged, as the failing test is not an issue of this PR. Thanks @pranathivemuri !

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

3 participants