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

Retain BED6 format? #65

Closed
aseveritt opened this issue Nov 22, 2023 · 4 comments
Closed

Retain BED6 format? #65

aseveritt opened this issue Nov 22, 2023 · 4 comments

Comments

@aseveritt
Copy link

Hi Noam!

I'm running a lot of bedtools intersect commands that I would love to replace with gia, but I was relying on the information in the bed6 format being retained.

e.g. fileA.bed
chr1 29300 29400

e.g. fileB.bed
chr1 29301 29400 CTAACTTTCCTATCAT-1 41 +
chr1 29328 29427 CTAACTTTCCTATCAT-1 40 -

e.g. output I need with the cell barcode.
chr1 29301 29400 CTAACTTTCCTATCAT-1 41 +

In this case, would I need to use bedrs instead of gia & create an interval type with my additional field?
-- Amanda

@aseveritt
Copy link
Author

Ah, sorry just saw issue #50 and #53. I assume that would solve this question too.

@noamteyssier
Copy link
Owner

Hey Amanda,

This is actually a different issue of mixing file formats (in this case bed3 and bed6). It's on my docket but I haven't had time to work on it yet.

A hacky workaround that you can use to use it immediately is to just make a pseudo bed6 from your bed3:

awk 'OFS="\t"{print $1, $2, $3, 0, 0, "+"}' < fileA.bed > fileA.bed6 

and then to process the bed files with the bed6 input format (the -T flag) you can run:

gia intersect -a fileA.bed6 -b fileB.bed -T bed6

Hopefully that should work for your use case.

It adds an extra step which is kind of annoying but my plan is to have both the inter-format comparisons built and auto-determining input format built after Thanksgiving.

@aseveritt
Copy link
Author

Thank you!! That workaround totally works for me.

@noamteyssier
Copy link
Owner

This took way longer than I wanted but this functionality has been added without the workaround in #112

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