This file is indexed.

/usr/lib/python2.7/dist-packages/cogent/app/sfold.py is in python-cogent 1.9-9.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python

"""Application controller for Sfold application

Option -o sets output directory,default ../output/
If working directory is changed during the work flow option -o
need to be reset. -o is currently set to cwd
"""

from cogent.app.util import CommandLineApplication,\
    CommandLineAppResult, ResultPath
from cogent.app.parameters import Parameter, FlagParameter, ValuedParameter,\
    MixedParameter,Parameters 
from os import getcwd
from sys import stderr

__author__ = "Shandy Wikman"
__copyright__ = "Copyright 2007-2016, The Cogent Project"
__contributors__ = ["Shandy Wikman"]
__license__ = "GPL"
__version__ = "1.9"
__maintainer__ = "Shandy Wikman"
__email__ = "ens01svn@cs.umu.se"
__status__ = "Development"

#IMPORTANT!!!!!
#must be specified if run outside sfold dir, default is ../param/ 
param_dir = 'your_path/sfold-2.0/param/'


class Sfold(CommandLineApplication):
    """Application controller Sfold application"""

    cwd = getcwd()
    _parameters = {
        '-o':ValuedParameter(Prefix='-',Name='o',Delimiter=' ',Value=cwd),
        '-a':ValuedParameter(Prefix='-',Name='a',Delimiter=' '),
        '-f':ValuedParameter(Prefix='-',Name='f',Delimiter=' '),
        '-l':ValuedParameter(Prefix='-',Name='l',Delimiter=' '),
        '-m':ValuedParameter(Prefix='-',Name='m',Delimiter=' '),
        '-w':ValuedParameter(Prefix='-',Name='w',Delimiter=' '),
        '-p':ValuedParameter(Prefix='-',Name='p',Delimiter=' ',Value=param_dir)
        }
    _command = 'sfold.X86_64.LINUX'
    _input_handler = '_input_as_string'


    def _get_result_paths(self,data):
        """Return a dict of ResultPath objects representing all possible output
        """
        result = {}

        #list of output files
        output_list = ['10structure','10structure_2','Dharmacon_thermo','bp',
                       'bprob','cdf','fe','loopr','oligo','oligo_f','pdf',
                       'sample','sample_1000','sirna','sirna_f','sirna_s',
                       'smfe','sstrand','stability']

        for name in output_list:
            try:
                path = '%s%s.out' % (self.WorkingDir,name)
                f = open(path)
                f.close()
                result[name] = \
                    ResultPath(Path=path)
            except IOError:
                stderr.write('path: %s\n' % self.WorkingDir)
                stderr.write('File: %s.out not written to result dict\n' % name)
                pass

        return result