Comments (2)
Thank you for the style notes. I had chosen tabs as a personal preference (in that I just found them more attractive to work with), but I’ll look for inconsistencies like the one you noticed.
I’ll make a pass at adding some readability/usability improvements as you noted as well.
Thanks!
Zach
On Oct 11, 2016, at 5:08 PM, Stephen J Bush <[email protected]mailto:[email protected]> wrote:
For the most part the code not too difficult to follow, but readability could be improved by limiting the line length to 80 columns and using better whitespace. I would recommend using a linter and following pep8 standards.
This is less an issue and more of a suggestion. Whether or not these recommendations are implemented is, of course, entirely up to you. Either way, thank you for taking the time to write this software!
For example, line 58 in probability.py:
current
return str(self.weights)+' '+str(self.values)+' '+self.method
better
return str(self.weights) + ' ' + str(self.values) + ' ' + self.method
best
return '{} {} {}'.format(self.weights, self.values, self.method)
another option
return ' '.join([self.weights, self.values, self.method])
Similarly, lines 22-24 in probability.py:
if len(self.values) != len(self.weights):
print '\nError: length and weights and values vectors must be the same.\n'
exit(1)
could be more pythonic by using exceptions:
if len(self.values) != len(self.weights):
msg = 'Length and weight vectors must be the same length'
raise ValueError(msg)
(also, take a look at the logging package instead of using print).
Finally, tabs. I personally prefer using spaces (pep8 also recommends spaces), but the decision is ultimately yours; however, please try to be consistent. For example, lines 98-101 in SequenceContainer.py are indented using tabs up to the normal indentation, but the arguments are aligned to the [ using spaces.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_zstephens_neat-2Dgenreads_issues_5&d=DQMCaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=iSEBNMfCHfS5bLIS7AqI6wkxgRNv8-2dMwRF43ddddU&m=7hMnCNquNqL7uAqM9oMVPCMD8Sc-8UHHKfP2D9rVgFA&s=SRF9LOZQ3wjhQSbqQ-P7OPNBVdyesJBvQXzFLhy66jg&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIHT1VvcD2fRzGzA3qKmQi3lB1nRtuv-2Dks5qzAjvgaJpZM4KUKMY&d=DQMCaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=iSEBNMfCHfS5bLIS7AqI6wkxgRNv8-2dMwRF43ddddU&m=7hMnCNquNqL7uAqM9oMVPCMD8Sc-8UHHKfP2D9rVgFA&s=M-OpCe8UpBD2MkW9dkLlTrPi3bh1lULYze89GXqFOJU&e=.
from neat-genreads.
Again, super quick response! Thanks!
Also--I hope you weren't offended by the comments/suggestions. Just things I noticed tracking down the other bug. Meant to be helpful.
from neat-genreads.
Related Issues (20)
- Bed file with more regions than reference HOT 1
- Expression levels HOT 1
- SequenceContainer.py fails with missing attribute in Seq object HOT 4
- update deprecated biopython functions HOT 1
- IndexError: list index out of range HOT 1
- Sequencing error rate question for whole genomes.
- error with read length HOT 3
- Multiple records with the same position in the golden VCF file HOT 1
- Standard deviation of coverage HOT 1
- "Something went wrong with the generated fasta file" error message with bacterial genreads wrapper HOT 4
- Null Sequencing Error Model HOT 2
- GRCH38 problems HOT 3
- Simulate SNPs only without indels HOT 1
- Bam input into compute_fraglen.py measures read length rather than insert size HOT 1
- gen_reads.py produces empty output files HOT 2
- Simulating genomes with complex ploidy HOT 1
- Prolonged Execution - any tips on how to parallelise execution on v3.0 HOT 1
- Plot failed
- Identical forward and reverse sequences for half of the reads in FASTQ files HOT 1
- Potential bug in compute_fraglen.py HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neat-genreads.