Load BED file on UCSC
2
0
Entering edit mode
7.1 years ago
maude • 0

Hi everyone!

I have a BED file that I'm trying to load on UCSC but I don't understand why it's not working. My BED file looks like this:

"chr1" 3694 3695 2.0683270951919
"chr1" 8907 8908 2.0683270951919
"chr1" 9923 9924 2.0683270951919
"chr1" 17898 17899 4.13665419038381
"chr1" 18070 18071 4.13665419038381
"chr1" 19726 19727 2.0683270951919
"chr1" 19848 19849 2.0683270951919
"chr1" 20479 20480 2.75776946025587

When I try to load it, I have this error message:

Error File 'Peaks_t2_ip110.bedgraph.bed' - Unrecognized format line 1 of file: "chr1" 3694 3695 2.0683270951919 (note: chrom names are case sensitive, e.g.: correct: 'chr1', incorrect: 'Chr1', incorrect: '1')

Does anybody could explain me what is wrong with my file? Thank you, Maude

UCSC BED Format • 2.9k views
ADD COMMENT
0
Entering edit mode

Thanks!

Unfortunately it's still not working...

 Error File 'Peaks_t2_ip110.bedgraph.bed' - Unrecognized format line 1 of file: chr1 3694 3695 2.0683270951919 (note: chrom names are case sensitive, e.g.: correct: 'chr1', incorrect: 'Chr1', incorrect: '1')
ADD REPLY
0
Entering edit mode

Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized.

How did you modify your file? With sed or with excel or some other editor?

ADD REPLY
0
Entering edit mode

I modified my R script:

write.table(f,paste(path,file,".bed", sep=""), sep="\t", col.name = FALSE, row.names = FALSE, quote = FALSE)

Because when I tried directly on the terminal with

sed 's/\"//' your_file.bed > new.bed

It removed only the quote on the left part (chr1')

ADD REPLY
0
Entering edit mode

Sorry about that. I have modified the command to remove all instances of the quote character. sed 's/\"//g' your_file.bed > new.bed.

BTW: I was able to use the snippet you posted above with UCSC after removing the quotes.

ADD REPLY
0
Entering edit mode

Thanks a lot for your help. Unfortunately something is still wrong with my file

Error File 'new.bed' - Unrecognized format line 1 of file: chr1 3693 3694 2.0683270951919 (note: chrom names are case sensitive, e.g.: correct: 'chr1', incorrect: 'Chr1', incorrect: '1')

Do you think it could be because BED files on UCSC need necessary an Header?

ADD REPLY
0
Entering edit mode

While I was able to get your file snippet to open in UCSC (without a header) I am not sure what those numbers are in the fourth column and if they are needed.

ADD REPLY
0
Entering edit mode

PS. I'm not able to use the snippet I posted even after removing the quotes... so maybe my problem is not coming from my file but it's something else related to the website. I will try to figure it out. Thank you very much!

ADD REPLY
0
Entering edit mode

It has been fixed. In fact I'm working with C.elegans and chromosomes' name needs to be different (chr1 = chrI). Thank you!

ADD REPLY
2
Entering edit mode
7.1 years ago
GenoMax 141k

remove the quotes (") you have around the chromosome name. Something like this sed 's/\"//g' your_file.bed > new.bed should do it.

ADD COMMENT
0
Entering edit mode
7.1 years ago
willgilks ▴ 360

You don't need the quotation marks.

ADD COMMENT

Login before adding your answer.

Traffic: 2400 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6