Entering edit mode
Is there a way to use seqinr the same way I do for FASTAs, but for FASTQs?
SRAfile <- read.fasta(file = dnafile, as.string = TRUE, forceDNAtolower = FALSE)
This works fine for FASTAs, but if dnafile is a FASTQ, it does not connect.
Warning in file(con, "r") :
cannot open file '/Users/hank/MSc/R Stuff/sra_data.fastq': No such file or directory
Error in file(con, "r") : cannot open the connection
I've looked through other functions in the package but couldn't see one for FASTQs specifically, any idea how to manage this? Or suggest a different package?
Read the error message:
No such file or directory
-- it's a problem with not finding the file, not with the package. There is a whitespace inR Stuff
, but whitespaces are only empty for the human eye, for a computer it's a character like everything else, so you have to respect that, see https://stackoverflow.com/questions/12902227/how-to-input-a-path-with-a-white-space -- or actually the best practice would be to not use whitespaces anywhere at all, use underscores or camelcase. By the way, fastq files are usually big and loading a fastq file into R might be blowing up your memory - just that you know, not even sure that function works on fastq anyway. What is the analysis aim, I am sure there are better tools for this.