fasta sequence is too long to be read
1
0
Entering edit mode
wang peter ★ 2.0k
@wang-peter-4647
Last seen 10.2 years ago
hello, all i met this problem rm(list=ls()) library(ShortRead); fastafile="unigenes.fasta" seqs <- readFasta(fastafile); Error in .read.fasta.in.XStringSet(efp_list, nrec, skip, use.names, elementType, : reading FASTA file unigenes.fasta: cannot read line 474, line is too long R version 2.13.2 (2011-09-30) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ShortRead_1.10.4 Rsamtools_1.4.3 lattice_0.19-33 [4] Biostrings_2.20.4 GenomicRanges_1.4.8 IRanges_1.10.6 loaded via a namespace (and not attached): [1] Biobase_2.12.2 grid_2.13.2 hwriter_1.3 [[alternative HTML version deleted]]
• 915 views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States
Hi, On Tue, Nov 29, 2011 at 12:32 PM, wang peter <wng.peter at="" gmail.com=""> wrote: > hello, all > > i met this problem > > rm(list=ls()) > library(ShortRead); > fastafile="unigenes.fasta" > seqs <- readFasta(fastafile); > > > Error in .read.fasta.in.XStringSet(efp_list, nrec, skip, use.names, > elementType, ?: > ?reading FASTA file unigenes.fasta: cannot read line 474, line is too long How long is it? You can always try opening the file in your favorite editor and introducing a carriage return there to split the sequence into two lines, perhaps. I suspect you can use the *nix `fold` command line utility to ensure that all your lines are less than, say 100 chars long, eg from the command line: $ fold -w 100 unigenes.fasta > unigenes.fold.fasta Just make sure that none of your description lines in the fasta file (the ones that start with ">whatever") aren't longer than whatever you set `-w` to be. HTH, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT

Login before adding your answer.

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