Invalid multibyte string R
0
0
Entering edit mode
2.2 years ago
DanK ▴ 10

I am trying to convert a BED file into BAM, and although it created, the following error appeared. How can be solved?

I tried to change the bed dataframe encoding, but without result.

Below are the command and the error.

> bedr(engine = "bedtools", 
method = "bedtobam -i",
params = "-g ./data/U00096.2.fasta.fai", 
input = list(bed), 
outputFile = newbam, 
check.chr = FALSE, 
check.sort = FALSE, 
check.zero.based = FALSE, 
check.valid = FALSE, 
check.merge = FALSE)
* Processing input (1): CONVERT TO BED * Checking input type... PASS
Input is to bed format
bedtools bedtobam -i /tmp/RtmpfljR3L/_111c6558b8lacc.bed -g ./data/U00096.2.fasta.fai

Error in bedr(engine = "bedtools", method = "bedtobam -t", params = "-g ./data/U00096.2.fasta.fai", :
invalid multibyte string at '<c9><cf><cf>)<8e>0<4a>M'.
dataframe R • 1.2k views
ADD COMMENT
0
Entering edit mode

I've copied your code to the post.

How does bedr change the fasta.fat in your params argument to fasta.fai automatically? Is that a typo or am I missing something?

ADD REPLY
0
Entering edit mode

Thank you for the reply. It is just a typo. I have corrected this. The fai file, contains one line of E. coli indexed information

ADD REPLY

Login before adding your answer.

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