-
Notifications
You must be signed in to change notification settings - Fork 309
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
saveAsBed writes missing score values as '.' instead of '0' #2039
Comments
I just found another problem with ADAMCOntext.saveAsBed: Even if you explicitly set the score to 0 in the FeatureRDD, the score is not properly coerced into an Integer between 0 and 1000. The output bed file writes the score as '0.0'. Then bedToBigBed gives:
So there currently is no valid way to write to a BED file with ADAM. As a workaround I will have to manually modify the output file before running bedToBigBed. |
Thank you for submitting this issue, @benwbooth! We follow the
https://bedtools.readthedocs.io/en/latest/content/general-usage.html That said, we could add an option to restrict the score field to the UCSC convention on save. What do you think? |
I don't mind if the score value is stored as a string, but right now in Is there any way the schema can be changed to store the score value as an |
No, we don't want to change the schema, as it represents the model across all feature formats. There is a chart documenting the mappings here The issue is only with saving to text files in BED format, so we might include a method that given a minimum and maximum value, interpolates the |
OK no problem, I was just going by the bedtools2 quote you posted that said the score was represented as a string:
Any solution that fixes UCSC compatibility is fine by me. Thanks! |
When using ADAMContext.saveAsBed to write a GenomicRDD to a bed file, if the score is unset, it writes the '.' character as the score instead of '0'. Trying to convert that bed file to a bigBed file, I get:
The '.' character is not a valid score in the BED format, unlike GFF. The score value must be set. A sensible default would be '0' or '1000'.
The text was updated successfully, but these errors were encountered: