faircloth-lab / phyluce

software for UCE (and general) phylogenomics
http://phyluce.readthedocs.org/
Other
76 stars 48 forks source link

ERROR message "can't read /var/mail/Bio" running the Cleanup the genome sequences step from the Tutorial IV: Identifying UCE Loci and Designing Baits To Target Them #313

Closed Ruben9161 closed 7 months ago

Ruben9161 commented 10 months ago

Dear Brant,

I'm starting to run "Tutorial IV: Identifying UCE Loci and Designing Baits To Target Them", but I got stuck in the very first steps. Specifically in step of "Cleanup the genome sequences", right after downloading and unziping the genomes.

I used the function:

from Bio import SeqIO with open("Name_of_Genome_File.fna", "rU") as infile: with open("outfileName.fasta", "w") as outf: for seq in SeqIO.parse(infile, 'fasta'): seq.name = "" seq.description = "" outf.write(seq.format('fasta'))

But it didn't work. So, I am wondering if I have to load any dependecies so the BIO - SeqIO can work. I don´t have much experience about programming and functions, so I don't know how to procede.

The error message is as follows (with the actual names of the files): (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ from Bio import SeqIO from: can't read /var/mail/Bio (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ with open("GCA_000390285.1_Agla_1.0_genomic.fna", "rU") as infile: -bash: syntax error near unexpected token (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ with open("anoGla1.fasta", "w") as outf: -bash: syntax error near unexpected token (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ for seq in SeqIO.parse(infile, 'fasta'): -bash: syntax error near unexpected token (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ seq.name = "" -bash: seq.name: command not found (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ seq.description = "" -bash: seq.description: command not found (phyluce-1.7.1) Alejandros-iMac:uce-coleoptera alejandro$ outf.write(seq.format('fasta')) -bash: syntax error near unexpected token `seq.format'

As you can see in the message above, each line of the function is treated as a separate command line. As I said before, I don't have much of experience so I don't know how to proceed, nor what I am doing wrong, or what should I do next.

The phyluce version is 1.7.1, does the tutorial works properly with this version, or it is better if I upgrade to the lattest version?

Thanks for your help, Rubén.

brantfaircloth commented 9 months ago

It looks like you are trying to run this without starting the Python interpreter, first (e.g. type "python" at the command line, and the python interpreter will start).

Ruben9161 commented 7 months ago

Thanks, that was the problem!!!!