Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakeb1996 opened this issue Oct 21, 2022 · 0 comments · May be fixed by #17

Comments

@jakeb1996
Copy link
Member

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:
@jakeb1996 jakeb1996 linked a pull request Jan 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant