-
Notifications
You must be signed in to change notification settings - Fork 166
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
cnvkit export vcf does not work when nbins is used instead of probes in cns header #585
Comments
We might need to wait for @etal's opinion here, but I don't think the
Since the CNS from genemetrics does not have the |
On the other hand, what we could do is just retain the |
No, wait, I'm wrong. CNN/CNR already contain bins, not the original probes. So the |
The column `n_bins` in the genemetrics output means exactly the same thing as `probes` in regular CNS files. For compatibility, it is better if they are named the same. This would also allow feeding genemetrics CNS files to the call and export commands (see etal#585).
The column `n_bins` in the genemetrics output means exactly the same thing as `probes` in regular CNS files. For compatibility, it is better if they are named the same. This would also allow feeding genemetrics CNS files to the call and export commands (see etal#585).
It did not occur to me to try running the I agree with @tskir 's solution to just change the header of the genemetrics output table to use |
The column `n_bins` in the genemetrics output means exactly the same thing as `probes` in regular CNS files. For compatibility, it is better if they are named the same. This would also allow feeding genemetrics CNS files to the call and export commands (see #585).
cnvkit version: 0.9.8
In my pipeline, after generating .cnr files (diploid X) they are processed by genemetrics without segments, then segmetrics (with --gender female to avoid shifting X log2s) to get statistics, and finally with call. Exporting the final call .cns to bed format works fine, but when exporting to vcf the files contain only the header and no cnvs. When running a pipeline that does normal segmentation instead of genemetrics export to vcf works. The only difference in the header is that the genemetrics case has a column 'n_bins' and the regular segmentation a column 'probes'.
The responsible line in export.py is 266, which does not check for the presence of n_bins or probes and assumes the latter:
out_dframe = segments.data.reindex(columns=["chromosome", "end", "log2", "probes"])
A quick fix is to run the files with n_bins through sed to convert to probes:
sed s/n_bins/probes/ $file
The text was updated successfully, but these errors were encountered: