-
Notifications
You must be signed in to change notification settings - Fork 8
add multiprocessing change to python3 #3
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
Open
SaberYoun6
wants to merge
50
commits into
umerijaz:master
Choose a base branch
from
SaberYoun6:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ts in order to make it multiprocessing this should allow a time clean up
…r with multiprocessing
… going to test on eight core machine
… far the faster of the ways it'll most like run faster on more cores
…nt for returning to any output file found this was redundants, add in a proper timed trail for a single core usage on 1.fa time trails into the readme file multiproccessing is done
SaberYoun6
commented
Jun 1, 2020
chopSEQ.py
Outdated
Comment on lines
145
to
151
| #Reference: https://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-pyton | ||
| #this allow the multiprocessor call and allow for the ability to print out the results | ||
| with concurrent.futures.ProcessPoolExecutor() as executor: | ||
| results =[executor.submit(process_seq_records, seq_record, forward_primer, reverse_primer, verbosity, minimum_read_length_threshold, maximum_read_length_threshold) for seq_record in SeqIO.parse(input_file,"fasta")] | ||
|
|
||
| for seq_record in SeqIO.parse(input_file,"fasta"): | ||
| if verbosity: | ||
| print('\x1b[6;37;40m' + str(seq_record.id) + '\x1b[0m') | ||
| forward_orientation_forward_primer_alignment=pairwise2.align.localms(str(seq_record.seq),forward_primer,primer_match_score, primer_mismatch_score, primer_open_gap_score, primer_extend_gap_score, one_alignment_only=1) | ||
| forward_orientation_reverse_primer_alignment=pairwise2.align.localms(str(seq_record.seq),str(Seq(reverse_primer).reverse_complement()),primer_match_score,primer_mismatch_score, primer_open_gap_score, primer_extend_gap_score, one_alignment_only=1) | ||
| reverse_orientation_forward_primer_alignment=pairwise2.align.localms(str(seq_record.seq),reverse_primer,primer_match_score,primer_mismatch_score, primer_open_gap_score, primer_extend_gap_score, one_alignment_only=1) | ||
| reverse_orientation_reverse_primer_alignment=pairwise2.align.localms(str(seq_record.seq),str(Seq(forward_primer).reverse_complement()),primer_match_score,primer_mismatch_score, primer_open_gap_score, primer_extend_gap_score, one_alignment_only=1) | ||
| for resultant in concurrent.futures.as_completed(results): | ||
| print(resultant.result()) |
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is microprocessing changing list comprehension for the reading in of the file in.
…single core add in new things to help to tell you how many processor a machine has
…misspelled one of them
… 0 or -negative processors
…rted to try and speed up the timing
…to send and error to the system call if you tried to access all the cores in your system it would have of dumped you to the usages and then exited the program
…oing to run a combined file time trail
…realized you cannot have zero processor being called and wanted all the threads to be called
… didn't bold instead left with *** ##:##***
I'm trying to manage any security concern that might come up
Create SECURITY.md
Create codeql-analysis.yml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
made it executable, change the script to python3 and add in multiprocessing through a list comprehension. add in a git ignore and an actual license and an AUTHORS pages as well. I'm not a fan of indentions so I changed it to be spaces instead.