This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Invalid multibyte string R

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

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?

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

0 answers

No answers yet.

Log in to answer this question.