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

BED file with a space delimiter misses the first annotation #1228

Closed
gaitat opened this issue Nov 19, 2020 · 5 comments
Closed

BED file with a space delimiter misses the first annotation #1228

gaitat opened this issue Nov 19, 2020 · 5 comments

Comments

@gaitat
Copy link

gaitat commented Nov 19, 2020

I have these two bed files:

BED file with a space delimiter

chr2 0 1
chr2 2 3
chr2 4 5
chr2 6 7
chr2 8 9

BED file with a tab delimiter

chr2	0	1
chr2	2	3
chr2	4	5
chr2	6	7
chr2	8	9

I load them into igv with:

            tracks: [
                {
                    name: "spaces",
                    type: "annotation",
                    format: "bed",
                    indexed: false,
                    // delimiter: ' ',
                    url: "http://127.0.0.1:8081//examples/annotation_edge_data_with_spaces.bed",
                },
                {
                    name: "tabs",
                    type: "annotation",
                    format: "bed",
                    indexed: false,
                    // delimiter: '\t',
                    url: "http://127.0.0.1:8081//examples/annotation_edge_data_with_tabs.bed",
                },
            ]

but the first annotation of the bed file with spaces does not show up. (I use a locus: "chr2:1-20")

It doesn't seem that specifying the delimiter key makes a difference.
Even If I add 100 to the genomic location, I dont see a difference. The first annotation in the bed file with spaces does not get drawn.

@jrobinso
Copy link
Contributor

Thanks for the report. Its not specified at UCSC, but the general consensus seems to be that bed files should be tab delimited. For sure a space delimited bed file will not work with many tools. Having said that, as its not specified we have tried to be whitespace agnostic, and I will fix this.

@jrobinso
Copy link
Contributor

See, for example https://bedtools.readthedocs.io/en/latest/

@gaitat
Copy link
Author

gaitat commented Nov 23, 2020

Maybe this is helpful. Just observed that when I add a line with # on top of the BED file with a space delimiter, then it works fine. i.e.

#
chr2 0 1
chr2 2 3
chr2 4 5
chr2 6 7
chr2 8 9

@jrobinso
Copy link
Contributor

jrobinso commented Nov 23, 2020 via email

@gaitat
Copy link
Author

gaitat commented Nov 28, 2020

Thanks

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