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

error when using croo to generate report #96

Open
yr-gh opened this issue Jul 4, 2022 · 4 comments
Open

error when using croo to generate report #96

yr-gh opened this issue Jul 4, 2022 · 4 comments

Comments

@yr-gh
Copy link

yr-gh commented Jul 4, 2022

Hello, I'm trying to generate ENCODE rna-seq-peipe report by croo, bu I met some problems.

The Comwell has printed that the pipeline has been run successfully, and the metadata.json file has beed generated.

But it still raised a bug when I used croo to generate a report.

The attachments are debug info file and metadata.json file.

thank you for helpful advice!
croo.log
metadata.json.log

@byee4
Copy link

byee4 commented Jul 21, 2022

Hi, I am hitting this error now as well using the dev branch. Could be related to? ENCODE-DCC/croo#13

@wangxiangxiu
Copy link

@yr-gh Hello, have you fixed this problem? It present similar issue when using croo to generate RNA-seq pipeline output.

@yr-gh
Copy link
Author

yr-gh commented Aug 23, 2022

@wangxiangxiu not yet, this problem seems occurring when generating report from MAplot.png, so when i run only with two replicates i delete MAplot-related (mad_qc in metadata.json) fields from metadata.json, then i re-run croo on the revised metadata.json. because i found there is no such problem when run with greater than 2 replicates (when you have more than 2 replicates, it seems not to run the mad_qc.py, so there is no error occurred).

@yr-gh
Copy link
Author

yr-gh commented Aug 23, 2022

@wangxiangxiu here is the py script i use to del mad_qc-related fields from metadata.json

del_mad_qc.py -j metadat.json -o revised_metadata.json

then re-run revised_metadata.json using croo again

if you have a better solution about this problem, please let me know, thank you

#!/usr/bin/env python

'''
Delete the mad_qc-related fileds, because croo cannot work correctly for some reason, if mad_qc is run.
The only way that I can solve the bug is to delete the mad_qc-related filed.
'''

import json
import argparse

def parse_arguments():
parser = argparse.ArgumentParser(description = 'Delete mad_qc-related fields from metadata.json.')
parser.add_argument('-j', '--json', metavar = 'JSON', type = str, required = True, help = 'input metadata.json file')
parser.add_argument('-o', '--out_file', metavar = 'JSON', type = str, required = True, help = 'output revised metadata.json file')
args = parser.parse_args()
return args

def main():
print('Start deleting ...')

args = parse_arguments()

with open(args.json, 'r') as ijf:
    ijf_content = json.load(ijf)

# delete mad_qc-related fields
del ijf_content['calls']['rna.mad_qc']
del ijf_content['outputs']['rna.mad_qc.madQCmetrics']
del ijf_content['outputs']['rna.mad_qc.python_log']
del ijf_content['outputs']['rna.mad_qc.madQCplot']
del ijf_content['inputs']['mad_qc_disk']

with open(args.out_file, 'w') as ojf:
    json.dump(ijf_content, ojf, sort_keys = False, indent = 4)

print('Delete done!')

if name == 'main':
main()

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

No branches or pull requests

3 participants