Skip to content

The RNAfold output is at risk of being overwritten if multiple instances of Crackling were launched from the same directory #12

@jakeb1996

Description

@jakeb1996

The RNAfold -o flag will write to a file named RNAfold_output.fold if no value for -o is provided.

In the code, below, no filename is provided. If multiple instances of Crackling have been launched from the same directory and some just happen to be at the folding step then RNAfold may overwrite its own output. I ran into this issue when running many instances of Crackling on a HPC.

To fix this issue, an output file should be specified so that the default is not used.

runner('{} --noPS -j{} -i {} -o'.format(
configMngr['rnafold']['binary'],
configMngr['rnafold']['threads'],
configMngr['rnafold']['input']
),
shell=True,
check=True
)
os.replace('RNAfold_output.fold' ,configMngr['rnafold']['output'])
printer('\t\tStarting to process the RNAfold results.')
RNAstructures = {}
with open(configMngr['rnafold']['output'], 'r') as fRnaOutput:

I used this code as my temporary fix:

runner('{} --noPS -j{} -i {} -o {}'.format(
        configMngr['rnafold']['binary'],
        configMngr['rnafold']['threads'],
        configMngr['rnafold']['input'],  
        configMngr['rnafold']['output']
    ),
    shell=True,
    check=True
)

#os.replace('RNAfold_output.fold' ,configMngr['rnafold']['output'])

printer('\t\tStarting to process the RNAfold results.')

RNAstructures = {}
with open(configMngr['rnafold']['output'], 'r') as fRnaOutput:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions