Returns the list of ExpressionLevels in this RNA Quantification.
966233
def getExpressionLevels(
            self, threshold=0.0, names=[], startIndex=0, maxResults=0):
        
        rnaQuantificationId = self.getLocalId()
        with self._db as dataSource:
            expressionsReturned = dataSource.searchExpressionLevelsInDb(
                rnaQuantificationId,
                names=names,
                threshold=threshold,
                startIndex=startIndex,
                maxResults=maxResults)
            expressionLevels = [
                SqliteExpressionLevel(self, expressionEntry) for
                expressionEntry in expressionsReturned]
            return expressionLevels
708421
def extract_smiles(s):
    """"""
    # TODO: This still gets a lot of false positives.
    smiles = []
    for t in s.split():
        if len(t) > 2 and SMILES_RE.match(t) and not t.endswith('.') and bracket_level(t) == 0:
            smiles.append(t)
    return smiles
485224
@Override
  protected List<String> getSignificantContent() {
    final List<String> result = super.getSignificantContent();
    if (((result.size() >= 1) && Objects.equal(this.getLineDelimiter(), IterableExtensions.<String>last(result)))) {
      int _size = result.size();
      int _minus = (_size - 1);
      return result.subList(0, _minus);
    }
    return result;
  }
1061925
def gene_forms(self):
        
        q = self.session.query(distinct(models.ChemGeneIxnGeneForm.gene_form))
        return [x[0] for x in q.all()]
730905
def range(self):
    
    chrs = set([x.range.chr for x in self.get_transcripts()])
    if len(chrs) != 1: return None
    start = min([x.range.start for x in self.get_transcripts()])
    end = max([x.range.end for x in self.get_transcripts()])
    return GenomicRange(list(chrs)[0],start,end)
501075
private static List<Monomer> getMonomersRNAOnlyBase(MonomerNotationUnitRNA rna, MonomerStore monomerStore)
			throws HELM2HandledException {
		try {
			List<Monomer> monomers = new ArrayList<Monomer>();
			for (MonomerNotationUnit unit : rna.getContents()) {
				String id = unit.getUnit().replace("[", "");
				id = id.replace("]", "");
				Monomer mon = MethodsMonomerUtils.getMonomer(rna.getType(), id, "");

				if (mon.getMonomerType().equals(Monomer.BRANCH_MOMONER_TYPE)) {
					monomers.add(mon);
				}
			}
			return monomers;
		} catch (Exception e) {
			e.printStackTrace();
			throw new HELM2HandledException(e.getMessage());
		}

	}
1210388
def _extract_level(self):
        """"""
        if self._level is None:
            split_tokens = self.split_tokens

            if not split_tokens:
                self._level = False
                self._component = False
                return

            x = (self.log_levels.index(split_tokens[1])
                 if split_tokens[1] in self.log_levels else None)

            if x is not None:
                self._level = split_tokens[1]
                self._component = split_tokens[2]
            else:
                self._level = False
                self._component = False
327677
def getExpressionLevelById(self, expressionId):
        
        sql = ("SELECT * FROM Expression WHERE id = ?")
        query = self._dbconn.execute(sql, (expressionId,))
        try:
            return sqlite_backend.fetchOne(query)
        except AttributeError:
            raise exceptions.ExpressionLevelNotFoundException(
                expressionId)
958671
def _init_exons(self):
        
        exon_starts = [self.chrom_start + int(s)
                       for s in self.bed_tuple.blockStarts.strip(',').split(',')]
        exon_sizes = list(map(int, self.bed_tuple.blockSizes.strip(',').split(',')))

        # get chromosome intervals
        exons = [(exon_starts[i], exon_starts[i] + exon_sizes[i])
                 for i in range(len(exon_starts))]
        no_utr_exons = self._filter_utr(exons)
        self.exons = no_utr_exons
        self.exon_lens = [e[1] - e[0] for e in self.exons]
        self.num_exons = len(self.exons)
        self.cds_len = sum(self.exon_lens)
        self.five_ss_len = 2*(self.num_exons-1)
        self.three_ss_len = 2*(self.num_exons-1)
        self._init_splice_site_pos()
825288
public final String[] getPathExpressions() {
        String pathExpression = this.pathExpression;
        Object[] pathExpressions = this.pathExpressions;
        if (pathExpression == null && (pathExpressions == null || pathExpressions.length == 0)) {
            // there's none ...
            return new String[] {};
        }
        if (pathExpression != null && (pathExpressions == null || pathExpressions.length == 0)) {
            // There's just one ...
            return new String[] {pathExpression};
        }
        List<String> expressions = new ArrayList<String>(pathExpressions.length + 1);
        addExpression(expressions, pathExpression);
        for (Object value : pathExpressions) {
            addExpression(expressions, value);
        }
        return expressions.toArray(new String[expressions.size()]);
    }
571800
def rnaQuantificationSetsGenerator(self, request):
        
        dataset = self.getDataRepository().getDataset(request.dataset_id)
        return self._topLevelObjectGenerator(
            request, dataset.getNumRnaQuantificationSets(),
            dataset.getRnaQuantificationSetByIndex)
671444
public List<SectionCharacteristic> getCharacteristics() {
        long value = get(SectionHeaderKey.CHARACTERISTICS);
        List<SectionCharacteristic> list = SectionCharacteristic.getAllFor(value);
        assert list != null;
        return list;
    }
832804
def legendLabel(self):
        
        excludedQualifiers = set((
            'codon_start', 'db_xref', 'protein_id', 'region_name',
            'ribosomal_slippage', 'rpt_type', 'translation', 'transl_except',
            'transl_table')
        )
        maxValueLength = 30
        result = []
        if self.feature.qualifiers:
            for qualifier in sorted(self.feature.qualifiers.keys()):
                if qualifier not in excludedQualifiers:
                    value = ', '.join(self.feature.qualifiers[qualifier])
                    if qualifier == 'site_type' and value == 'other':
                        continue
                    if len(value) > maxValueLength:
                        value = value[:maxValueLength - 3] + '...'
                    result.append('%s: %s' % (qualifier, value))
        return '%d-%d %s%s.%s' % (
            int(self.feature.location.start),
            int(self.feature.location.end),
            self.feature.type,
            ' (subfeature)' if self.subfeature else '',
            ' ' + ', '.join(result) if result else '')
900890
public List<ExpressionMapping> getInputOnlyExpressionMappings() {
        List<ExpressionMapping> list = new LinkedList<ExpressionMapping>();
        for (ExpressionMapping em : _inputExpressionMappings) {
            if (em.getOutput() == null) {
                list.add(em);
            }
        }
        return list;
    }
1049117
def rnaseqc_general_stats (self):
        
        headers = OrderedDict()
        headers['Expression Profiling Efficiency'] = {
            'title': '% Expression Efficiency',
            'description': 'Expression Profiling Efficiency: Ratio of exon reads to total reads',
            'max': 100,
            'min': 0,
            'suffix': '%',
            'scale': 'YlGn',
            'modify': lambda x: float(x) * 100.0
        }
        headers['Genes Detected'] = {
            'title': '# Genes',
            'description': 'Number of genes detected with at least 5 reads.',
            'min': 0,
            'scale': 'Bu',
            'format': '{:,.0f}'
        }
        headers['rRNA rate'] = {
            'title': '% rRNA Alignment',
            'description': ' rRNA reads (non-duplicate and duplicate reads) per total reads',
            'max': 100,
            'min': 0,
            'suffix': '%',
            'scale': 'Reds',
            'modify': lambda x: float(x) * 100.0
        }

        self.general_stats_addcols(self.rna_seqc_metrics, headers)
1318439
public List<String> getArgs() {
        List<String> args = new ArrayList<String>();
        getArgs(this.expression, args);

        return args;
    }
1314001
def __expr_str(cls, expr, level):
        ''''''
        ident = ' ' * level * 4

        if isinstance(expr, tuple):
            return '{}{}'.format(ident, str(expr))

        if expr.etype[0] in ['pvar', 'constant']:
            return '{}Expression(etype={}, args={})'.format(ident, expr.etype, expr.args)

        if not isinstance(expr, Expression):
            return '{}{}'.format(ident, str(expr))

        args = list(cls.__expr_str(arg, level + 1) for arg in expr.args)
        args = '\n'.join(args)
        return '{}Expression(etype={}, args=\n{})'.format(ident, expr.etype, args)