Skip to content

Conversation

@SaberYoun6
Copy link

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.

SaberYoun6 added 20 commits May 21, 2020 20:52
…ts in order to make it multiprocessing this should allow a time clean up
… 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
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())
Copy link
Author

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.

SaberYoun6 added 21 commits June 7, 2020 10:36
…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
…realized you cannot have zero processor being called and wanted all the threads to be called
I'm trying to manage any security concern that might come up
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.

1 participant