seq=["-"]*l# nts that are not resolved will be marked "-" in the sequence, and their mask at 0.
mask=[0]*l# nts that are not resolved will have a mask at 0
seq=["-"]*l# ... and will be marked "-" in the sequence.
# the residue number of the chain start (which has been previously extracted from a whole mmCIF file)
resnum_start=int(nts[0]["nt_resnum"])
forntinnts:
...
...
@@ -216,23 +261,32 @@ class Chain:
t=np.NaN
else:
t=float(nt["theta_prime"])
p=int(nt["nt_resnum"])-resnum_start
mask[p]=int(nt["nt_code"]in"ACGU")# U is a U, u is a modified U and should be replaced by consensus ?
seq[p]=nt["nt_code"].upper().replace('?','-').replace('P','U').replace('T','U')# to align the chain with its family. The final nt should be taken from the PSSM.
p=int(nt["nt_resnum"])-resnum_start# index of the nt in the chain
# All non-regular-ACGU nucleotides (incl. modified & missing) are masked to 0.
# They will be replaced by the consensus in the alignment.
# U is a U, u is a modified U and should be replaced.
mask[p]=int(nt["nt_code"]in"ACGU")
# seq will be later updated with consensus for all positions with mask=0
self.args_=args# The args tuple of the function to run
self.checkFunc_=checkFunc# A function to check if the Job as already been executed before (and abort execution if yes)
self.checkArgs_=checkArgs# Arguments for the checkFunc
self.results_file=results# A filename where the job stores its results, to check for existence before execution
self.priority_=priority# Priority of the job in a list of jobs (Jobs with priority 1 are processed first, then priority 2, etc. Unrelated to processes priority.)
self.timeout_=timeout# Abort the job if taking too long
self.comp_time=-1# Time to completion of the job. -1 means 'not executed yet'
self.max_mem=-1# Peak RAM+Swap usage of the job. -1 means 'not executed yet'
self.label=label# Title
# Deploy the job on a Pool() started using 'how_many_in_parallel' CPUs.
print(f"[{running_stats[0]+running_stats[2]}/{jobcount}]\t{j.func_.__name__}({', '.join([str(a) for a in j.args_ if not ((type(a) == list) and len(a)>3)])})")