Set the hmm used by graftM to cross check for euks.
423676
def set_euk_hmm(self, args):
        ''
        if hasattr(args, 'euk_hmm_file'):
            pass
        elif not hasattr(args, 'euk_hmm_file'):
            # set to path based on the location of bin/graftM, which has
            # a more stable relative path to the HMM when installed through
            # pip.
            setattr(args, 'euk_hmm_file', os.path.join(os.path.dirname(inspect.stack()[-1][1]),'..','share', '18S.hmm'))
        else:
            raise Exception('Programming Error: setting the euk HMM')
1128687
private void registerMismatchAndReport(
      Node n,
      DiagnosticType diagnostic,
      String msg,
      JSType found,
      JSType required,
      Set<String> missing,
      Set<String> mismatch) {
    String foundRequiredFormatted = formatFoundRequired(msg, found, required, missing, mismatch);
    JSError err = JSError.make(n, diagnostic, foundRequiredFormatted);
    registerMismatch(found, required, err);
    report(err);
  }
1096992
def sub_hmm(self, states):
        

        """
        # restrict initial distribution
        pi_sub = self._Pi[states]
        pi_sub /= pi_sub.sum()

        # restrict transition matrix
        P_sub = self._Tij[states, :][:, states]
        # checks if this selection is possible
        assert np.all(P_sub.sum(axis=1) > 0), \
            'Illegal sub_hmm request: transition matrix cannot be normalized on ' + str(states)
        P_sub /= P_sub.sum(axis=1)[:, None]

        # restrict output model
        out_sub = self.output_model.sub_output_model(states)

        return HMM(pi_sub, P_sub, out_sub, lag=self.lag)
496596
def run_hmmbuild(self):

        '''
        
        '''

        for alignment in self.alignment_list:

            print 'building Hmm for', alignment

            alignment_full_path = self.alignment_dir + alignment
            query_name = alignment.split("_")[0]
            self.query_names.append(query_name)

            new_hmm= self.hmm_dir + query_name + ".hmm"

            hmmbuild_output = subprocess.call(["hmmbuild", new_hmm,
             alignment_full_path])

        print 'hhbuild complete for', self.query_names
49000
def tas2mach(tas, h):
    
    a = vsound(h)
    M = tas / a
    return M
682872
def run(align_bams, items, ref_file, assoc_files, region, out_file):
    
    if not utils.file_exists(out_file):
        paired = vcfutils.get_paired_bams(align_bams, items)
        vrs = bedutils.population_variant_regions(items)
        target = shared.subset_variant_regions(vrs, region,
                                               out_file, items=items, do_merge=True)
        if paired:
            return _run_somatic(paired, ref_file, target, out_file)
        else:
            return _run_germline(align_bams, items, ref_file, target, out_file)
    return out_file
345468
def check(self, message, ecc, k=None):
        ''''''
        if not k: k = self.k
        message, _ = self.pad(message, k=k)
        ecc, _ = self.rpad(ecc, k=k)
        if self.algo == 1 or self.algo == 2:
            return self.ecc_manager.check_fast(message + ecc, k=k)
        elif self.algo == 3 or self.algo == 4:
            return reedsolo.rs_check(bytearray(message + ecc), self.n-k, fcr=self.fcr, generator=self.gen_nb)
366201
def _set_m2ms(self, old_m2ms):
        

        for k, v in old_m2ms.items():
            if v:
                setattr(self, k, v)
719760
def _check_checksum(msg):
    """"""
    checksum = int(msg[-2:], 16)
    for char in msg[:-2]:
        checksum += ord(char)
    if (checksum % 256) != 0:
        raise ValueError("Elk message checksum invalid")
756081
private void rechecksqlistpl()
    {
    	if(data != null)
    	{
    		Node[] childrens = ((SimpleNode)data).getChildren();
    		if(childrens != null && childrens.length > 0)
    		{
    			boolean switchcase = true;
    			for(Node node:childrens)
    			{
    				if(!(node instanceof ASTText))
    				{
    					switchcase = false;
    					break;
    				}
    			}
    			if(switchcase)
    			{
    				this.esInfo.setTpl(false);
    				 
    			}
    			else
    			{
    				this.esInfo.setTpl(true);
    			}
    		}
    		
    	}
    }
160291
def eucdist_task(newick_string_a, newick_string_b, normalise, min_overlap=4, overlap_fail_value=0):
    
    tree_a = Tree(newick_string_a)
    tree_b = Tree(newick_string_b)
    return treedist.eucdist(tree_a, tree_b, normalise, min_overlap, overlap_fail_value)
1358520
def run(align_bams, items, ref_file, assoc_files, region, out_file):
    
    call_file = "%s-raw.vcf.gz" % utils.splitext_plus(out_file)[0]
    strelka_work_dir = "%s-work" % utils.splitext_plus(out_file)[0]
    paired = vcfutils.get_paired_bams(align_bams, items)
    if paired:
        assert paired.normal_bam, "Strelka2 requires a normal sample"
        call_file = _run_somatic(paired, ref_file, assoc_files, region, call_file, strelka_work_dir)
    else:
        call_file = _run_germline(align_bams, items, ref_file,
                                  assoc_files, region, call_file, strelka_work_dir)
    return _af_annotate_and_filter(paired, items, call_file, out_file)
624715
def _CheckFieldMaskMessage(message):
  """"""
  message_descriptor = message.DESCRIPTOR
  if (message_descriptor.name != 'FieldMask' or
      message_descriptor.file.name != 'google/protobuf/field_mask.proto'):
    raise ValueError('Message {0} is not a FieldMask.'.format(
        message_descriptor.full_name))
1235747
def _cross_check(self, pub_key):
        
        if self.curve_name != pub_key.curve.name:
            raise ValueError(
                "The curve in private key {} and in algorithm {} don't "
                "match".format(pub_key.curve.name, self.curve_name))
455785
def cas2mach(Vcas, H):
    """"""
    Vtas = cas2tas(Vcas, H)
    Mach = tas2mach(Vtas, H)
    return Mach
9516
private void checkDuplicate() {
		KeyboardShortcut ks = this.getDuplicate();
		if (ks != null) {
			this.setFieldValue(FIELD_INFO, Constant.messages.getString("keyboard.dialog.warning.dup", ks.getName()));
		} else {
			this.setFieldValue(FIELD_INFO, "");
		}
	}
859239
def vtas2mach(tas, h):
    
    a = vvsound(h)
    M = tas / a
    return M