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

report-config.yaml missing #43

Open
kkNGSKOCMG opened this issue May 4, 2024 · 3 comments
Open

report-config.yaml missing #43

kkNGSKOCMG opened this issue May 4, 2024 · 3 comments

Comments

@kkNGSKOCMG
Copy link

mity call seem to work fine but I get the following error message after running mity report.

call

docker run -w "$PWD" -v "$PWD":"$PWD" drmjc/mity call --normalise HG002.hs37d5.2x250.small.MT.RG.bam
This was fine and
HG002.hs37d5.2x250.small.MT.RG.normalise.vcf.gz
was created.

Then I ran

Docker run -w "$PWD" -v "$PWD":"$PWD" drmjc/mity report HG002.hs37d5.2x250.small.MT.RG.normalise.vcf.gz
mity 1.0.0

I got the following error messages.

mity 1.0.0
Generating mity report
Traceback (most recent call last):
File "/usr/local/bin/mity", line 33, in
main()
File "/usr/local/bin/mity", line 29, in main
args.func(args)
File "/usr/local/lib/python3.10/site-packages/mitylib/commands.py", line 247, in _cmd_report
report.Report(
File "/usr/local/lib/python3.10/site-packages/mitylib/report.py", line 447, in init
self.run()
File "/usr/local/lib/python3.10/site-packages/mitylib/report.py", line 463, in run
self.output_dir, self.prefix + ".annotated_variants.xlsx"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Please help.

@kkNGSKOCMG
Copy link
Author

(continued)

The above error was partially resolved by changing
report.py" as below.

xlsx_name = os.path.join(
self.output_dir, self.prefix + ".annotated_variants.xlsx"
)
to
xlsx_name = "annotated_variants.xlsx"

However,
the following error appeared thereafter.

lib/python3.7/site-packages/mitylib/report.py", line 179, in init
with open("report-config.yaml", "r") as report_config_file:
FileNotFoundError: [Errno 2] No such file or directory: 'report-config.yaml'

Can you provide
report-config.yaml
?

@RogueRussell
Copy link

RogueRussell commented May 14, 2024

@kkNGSKOCMG I had this issue as well and was able to resolve it so hopefully this helps you too. I manually downloaded the report-config.yaml from github (https://github.com/KCCG/mity/blob/master/mitylib/report-config.yaml). Then I put it in the mitylib file of my own download. That MIGHT work for you. It didn't for me. It still couldn't find it. So I manually edited the report.py file myself to direct it to the absolute path of the config file and that worked. Should look something like this:

# Define the absolute path to the configuration file
        report_config_path = "youraboslutepath/mitylib/report-config.yaml"

        # Open the configuration file using the absolute path
        with open(report_config_path, "r") as report_config_file:
            self.report_config = yaml.safe_load(report_config_file)

So hopefully that authors will fix this but in the meantime, this worked for me.

@drmjc
Copy link
Member

drmjc commented May 27, 2024

thanks for reporting this. @trentzz can you please look into resolving this?

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