This is a test version of Biostars. For the public version, visit https://www.biostars.org.
fasta file loading error

Hello

I hava a sequence file containing 10,22,058 entries in fasta format. I wanted to load this file in the R using "seqinr" package.

I have installed the seqinr and ade4 packages.

When I run the command it gives the error and only around 10,000 sequences out of 10,22,058 are showed in the console window.

The code I tried to load the file id

getwd()
library(seqinr)
library(ade4)

read.fasta(file="Z:/R/07072015/CSANX.fasta", seqtype ="AA", as.string = TRUE, set.attributes = FALSE, legacy.mode = TRUE, strip.desc = FALSE)

after executing it gives the error

[ reached getOption("max.print") -- omitted 1012058 entries ]

Could you please guide what could be the possible reason for this.

Thanks in advance

read.fasta

1 answer

You need to assign that to a variable. As is, you're reading it in and printing the output to the screen. BTW, that's not an error, just a warning.

fa <- read.fasta(file="Z:/R/07072015/CSANX.fasta", seqtype ="AA", as.string = TRUE, set.attributes = FALSE, legacy.mode = TRUE, strip.desc = FALSE)

Thanks for correction.

This command works in this warning.

options(max.print=1.5E6)

If you just wanted to view a fasta file it'd be simpler to just use cat.

Log in to answer this question.