I am attempting to use samtools faidx to pull down a sequence to do some visualization in R. My current code reads:
system(sprintf("samtools faidx Genome/hg38.fa chr:36287064-36287162,intern = TRUE)[])
But unfortunately, the R only outputs the first 60 nucleotides. When I run the samtools faidx function on command line, I can see that the second line is below the first 60nt.
Is there a samtools option I can specify to have it be on a single line? I can write an R script to figure that out, but I would like to avoid that, as this range/size will change and not all ranges will be over multiple lines.