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

NameError: name '_LOGGER' is not defined #266

Open
atraunbauer opened this issue Jan 17, 2024 · 4 comments
Open

NameError: name '_LOGGER' is not defined #266

atraunbauer opened this issue Jan 17, 2024 · 4 comments

Comments

@atraunbauer
Copy link

Hi, when doing a test run with the test1 files provided the script is running until the test1_bamQC.tsv should be created. At this point I am getting an error message:

NameError: name '_LOGGER' is not defined

I attached the PEPATAC_log.txt

Could you please help to solve this? Thank you so much!

PEPATAC_log.txt

@donaldcampbelljr
Copy link
Member

Hello,

Just curious, did you use Looper to run your samples? https://github.com/pepkit/looper

I'm wondering if not using Looper would cause this to happen as Looper gets Logger.

@atraunbauer
Copy link
Author

Hi,

thanks for getting back to me!

Yes, I used looper (version 1.6.0) to run the test1 samples.

@donaldcampbelljr
Copy link
Member

Did you happen to edit the file bamQC.py?
Can you confirm that this code is still present?

pepatac/tools/bamQC.py

Lines 243 to 257 in ffa7cc2

if __name__ == "__main__":
args = parse_args(sys.argv[1:])
_LOGGER = logmuse.logger_via_cli(args, make_root=True)
qc = bamQC(reads_filename=args.infile,
out_filename=args.outfile,
n_proc=args.cores,
verbosity=args.verbosity)
qc.register_files()
good_chromosomes = qc.run()
_LOGGER.debug("Reduce step (merge files)...")
qc.combine(good_chromosomes)

Specifically: _LOGGER = logmuse.logger_via_cli(args, make_root=True)

@atraunbauer
Copy link
Author

Yes _LOGGER = logmuse.logger_via_cli(args, make_root=True) is still there. I didn't edit the bamQC.py file.

parallel processed computation of matrix for each chromosome

if name == "main":

args = parse_args(sys.argv[1:])
_LOGGER = logmuse.logger_via_cli(args, make_root=True)

qc = bamQC(reads_filename=args.infile,
           out_filename=args.outfile,
           n_proc=args.cores,
           verbosity=args.verbosity)

qc.register_files()
good_chromosomes = qc.run()

_LOGGER.debug("Reduce step (merge files)...")
qc.combine(good_chromosomes)

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

2 participants