Hello,

I am using MAFFT to align multiple nucleotide sequences. I am using the following code:

system(paste0("mafft --maxiterate 1000 Alignment_output/",GENE,".fa > ",GENE,".mafft.fa"))

But I have received the following error message:

nthread = 0
nthreadpair = 0
nthreadtb = 0
ppenalty_ex = 0
stacksize: 8192 kb
generating a scoring matrix for nucleotide (dist=200) ... done
Gap Penalty = -1.53, +0.00, +0.00
========================================================================= 
========================================================================= 
=== 
=== Alphabet 'z' is unknown.
=== Please check site 2208 in sequence 4.
=== 
=== To make an alignment that has unusual characters (U, @, #, etc), try  
=== % mafft --anysymbol input > output
=== 
========================================================================= 
========================================================================= 
Illegal character z

Then I inserted --anysymbol in that above code. But again I receive the following message:

inputfile = orig

Characters '= < >' can be used only in the title lines in the --anysymbol or --text mode.

The output file is empty and no result.

Can you please tell me how can I solve this issue?

Thanks a lot.

To clarify, here are the full codes that I used to run. I ran the scripts on a cluster.

The folder structure looks like the following:

ST16CH_Denovo
    ...ISOLATE_ID1
    ......scaffolds.fasta
    ...ISOLATE_ID2
    ......scaffolds.fasta

# Making a BLAST database:

mkdir BLAST_DB
mkdir BLAST_output
# Define the path to the folder containing de novo assemblies


 DENOVOFOLDER=ST16CH_Denovo
# Create Blast databases for all assemblies


 isolates=( $( ls $DENOVOFOLDER ) )

# generate Blast DB + fasta index (fai) for each scaffolds.fasta file
    for isolatespades in ${isolates[@]} 
    do  
    echo $isolatespades 
    isolate=$( echo $isolatespades ) 
    echo $isolate 
    makeblastdb -in $DENOVOFOLDER/$isolatespades/scaffolds.fasta -dbtype nucl -out BLAST_DB/$isolate; samtools faidx $DENOVOFOLDER/$isolatespades/scaffolds.fasta 
    samtools faidx $DENOVOFOLDER/$isolatespades/scaffolds.fasta
done

# Define the fasta file you want to use
ORIGFILE= gene_name.fa
cp $ORIGFILE blast.gene_name.query.txt
# define a label to be used later
GENE=(gene_name)

isolates=( $( ls $DENOVOFOLDER ) )

 # run blast  

for isolatespades in ${isolates[@]} 
do   
    echo $isolatespades   
    isolate=$( echo $isolatespades)  
    echo $isolate   
    blastn -query blast.$GENE.query.txt -db BLAST_DB/$isolate -out BLAST_output/$isolate.$GENE.blastn.txt -outfmt 6
done



Source link