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 if special characters in column names. replace illegal characters or warning or error out early #68

Open
Fedja opened this issue Jan 30, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Fedja
Copy link
Contributor

Fedja commented Jan 30, 2020

filter & group SNPs
Traceback (most recent call last):
  File "autoreporting/Scripts/main.py", line 125, in <module>
    main(args)
  File "autoreporting/Scripts/main.py", line 34, in main
    ignore_region=args.ignore_region, cred_set_file=args.cred_set_file,ld_api=ld_api)
  File "/mnt/disks/r4/mitja/autoreporting/Scripts/gws_fetch.py", line 210, in fetch_gws
    temp_df=get_gws_variants(gws_fpath,sign_treshold=sig_tresh_2,dtype=dtype,columns=columns,compression="gzip")
  File "/mnt/disks/r4/mitja/autoreporting/Scripts/gws_fetch.py", line 170, in get_gws_variants
    retval=retval[ [ columns["chrom"],columns["pos"],columns["ref"],columns["alt"],columns["pval"], columns["beta"],columns["af"] ] ]
  File "/home/mitja/.local/lib/python3.6/site-packages/pandas/core/frame.py", line 2806, in __getitem__
    indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
  File "/home/mitja/.local/lib/python3.6/site-packages/pandas/core/indexing.py", line 1551, in _get_listlike_indexer
    keyarr, indexer, o._get_axis_number(axis), raise_missing=raise_missing
  File "/home/mitja/.local/lib/python3.6/site-packages/pandas/core/indexing.py", line 1644, in _validate_read_indexer
    raise KeyError(f"{not_found} not in index")
KeyError: "['#CHROM'] not in index"
@Fedja Fedja added the bug Something isn't working label Jan 30, 2020
@Fedja Fedja added enhancement New feature or request and removed bug Something isn't working labels Jan 30, 2020
@Lipastomies
Copy link
Collaborator

Can you add the script call and input file columns? I usually get that error if the input file has different column names than those that are supplied with --column-labels.
Nevertheless, that error should be handled more gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants