Unconfigured Ad
Collapse
X
-
Easiest way to fix this is to use seqret in emboss. Just convert the fasta file to ncbi style fasta and it automatically fixes the issue.
-
The problem with scaffold_28 in this file was the same problem that was reported here. It has now been fixed, and the fix will appear in samtools (and htslib) 1.3.Originally posted by baohua100 View Post$ ./samtools faidx /media/Poplar/baohua/genome/poplar_genome.fa
[fai_build_core] different line length in sequence 'scaffold_28'.
Leave a comment:
-
Thank you for this. Just ran into this problem.Originally posted by maubp View PostJust for anyone interested
here is the Biopython equivalent:
The convert function returns the number of records if you wanted that information.Code:from Bio import SeqIO SeqIO.convert("inputfilename.fas", "fasta", "outputfilename.fas", "fasta")
Leave a comment:
-
I had the same sort of segmentation fault. There were no blank lines in my file though. It was apparently due to one of my sequences being >65535 bp (though I don't know why that should matter).
Maubp's biopython code took care of it nicely. Thanks!
Leave a comment:
-
Ah - blank lines at the end of the file can be easily overlooked.
In principle I believe that faidx can cope with blank lines *between* records, but I haven't made time to work out the required code changes to do this. It would probably save some general aggravation though
Leave a comment:
-
Figured it out on my own.Originally posted by jdjax View PostHello, I am coming across the same error. However I have tried that Bio script posted above and it did not work stating some error.
I then looked at my fasta file in vim and it does not have any blank lines in the file.
Does any one have a suggestion of how to fix this problem so that I can use samtools faidx common on my fasta file?
Thank you in advance for your help.
Leave a comment:
-
Hello, I am coming across the same error. However I have tried that Bio script posted above and it did not work stating some error.Originally posted by michmich View PostThe problem is that your FASTA file has a blank lines in it.
you need to get rid of them!!!
you can :g/^$/d in vi/vim editor.
I then looked at my fasta file in vim and it does not have any blank lines in the file.
Does any one have a suggestion of how to fix this problem so that I can use samtools faidx common on my fasta file?
Thank you in advance for your help.
Leave a comment:
-
The problem is that your FASTA file has a blank lines in it.
you need to get rid of them!!!
you can :g/^$/d in vi/vim editor.
Leave a comment:
-
Hello, I have the same problem. I found the last lines in fa file likes:
That means the last line has not the same length with others.Code:ggttagggtgtggtgtgtgggtgtgtgtgggtgtggtgtgtgtgggtgtg gtgtgtgggtgtgggtgtgggtgtgggtgtgtgggtgtggtgtgtgggtg tggT
My question is that can I manually modify instead of using a software.
I don't want to install too many software because of rare usage.
Thanks.
Leave a comment:
-
I faced the same problem, but solved with webbrewer's code!
Thanks a lot!Originally posted by webbrewer View PostThis bioperl snippet fixes the fasta:
Code:use Bio::SeqIO; $in = Bio::SeqIO->new(-file => "inputfilename", -format => 'Fasta'); $out = Bio::SeqIO->new(-file => ">outputfilename", -format => 'Fasta'); while ( my $seq = $in->next_seq() ) {$out->write_seq($seq); }
Leave a comment:
-
Just for anyone interestedOriginally posted by webbrewer View PostThis bioperl snippet fixes the fasta
here is the Biopython equivalent:
The convert function returns the number of records if you wanted that information.Code:from Bio import SeqIO SeqIO.convert("inputfilename.fas", "fasta", "outputfilename.fas", "fasta")
Leave a comment:
-
Thanks very much webbrewer for your bioperl fix, it worked perfectly.
Leave a comment:
-
I just found the same thing when there are blank lines in the FASTA file. The message "different line length" is very misleading in this case. I'll report this bug.Originally posted by baohua100 View Postpopulus@Rust:~/samtools-0.1.5c_x86_64-linux$ ./samtools faidx /media/Poplar/baohua/genome/poplar_genome.fa
[fai_build_core] different line length in sequence 'scaffold_28'.
Segmentation fault
What's the meaning of defferent line length ?
Leave a comment:
Latest Articles
Collapse
-
by SEQadmin2
CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).
Despite this, “CRISPR helped turn genome editing from a specialized technique into...-
Channel: Articles
07-31-2026, 11:01 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 08-24-2026, 10:32 AM
|
0 responses
37 views
0 reactions
|
Last Post
by SEQadmin2
08-24-2026, 10:32 AM
|
||
|
Started by SEQadmin2, 08-20-2026, 11:17 AM
|
0 responses
44 views
0 reactions
|
Last Post
by SEQadmin2
08-20-2026, 11:17 AM
|
||
|
Started by SEQadmin2, 08-18-2026, 10:05 AM
|
0 responses
49 views
0 reactions
|
Last Post
by SEQadmin2
08-18-2026, 10:05 AM
|
||
|
Started by SEQadmin2, 08-13-2026, 12:22 PM
|
0 responses
49 views
0 reactions
|
Last Post
by SEQadmin2
08-13-2026, 12:22 PM
|
Leave a comment: