error with bedtools slop
3
0
Entering edit mode
10.7 years ago
Samad ▴ 90

Hi,

I am trying to run a bedtools slop on my bed file and hg19.genome

bedtools slop -i H3K27me3.bed -g hg19.genome -b 30

I get the following error:

Less than the req'd two fields were encountered in the genome file (genomes/hg19.genome) at line 2.  Exiting.

Any suggestions?

Thanks in advance
Samad

bedtools ChIP-Seq • 7.6k views
ADD COMMENT
4
Entering edit mode
10.7 years ago
Samad ▴ 90

The problem was with my hg19.genome file, the correct form has to be as follow (2 columns):

chrom    size
chr1    249250621
chr2    243199373
chr3    198022430
chr4    191154276
chr5    180915260
chr6    171115067
chr7    159138663
chrX    155270560
chr8    146364022
....

To create a new hg19.genome from ucsc, use this:

mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e "select chrom, size from hg19.chromInfo"  > hg19.genome

Thank you for the suggestions

ADD COMMENT
2
Entering edit mode
10.7 years ago

You might also try bedops --range, which doesn't require any genome table, e.g.:

$ bedops --range 30 --everything H3K27me3.bed > answer.bed
ADD COMMENT
0
Entering edit mode
10.7 years ago
PoGibas 5.1k

<Deleted as OP edited his question>

ADD COMMENT
0
Entering edit mode

Sorry, I just forgot to put -g in my post, the error comes with :

bedtools slop -i H3K27me3.bed -g hg19.genome -b 30

Thank you

ADD REPLY
0
Entering edit mode

Post example of your genome file.

ADD REPLY
0
Entering edit mode

I followed steps from the link: http://bedtools.readthedocs.org/en/latest/content/tools/slop.html

hg19.genome is compressed and containing files: cytoBand.txt, hg_alias.tab, proprety.txt and refGene.txt

ADD REPLY

Login before adding your answer.

Traffic: 1884 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