0

FASTQ (Illumina Miseq mate ペアのゲノム配列から生成された) ファイルを FASTA に変換し、最終的に注釈付き参照配列を使用してそれを Genbank に変換しようとしています。私はBiopythonチュートリアルの指示に従っています。これが私のコードとエラーです。

from Bio import SeqIO
records = SeqIO.parse("~/Users/ryanjhope/Documents/PhD/DNA_Sequences/Genome/C. aceto_∆pyrE_∆bcd_Deepseq/YZ1_S11_L001_R1_001.fastq", "fastq")
count = SeqIO.write(records, "~/Users/ryanjhope/Documents/PhD/DNA_Sequences/Genome/C. aceto_∆pyrE_∆bcd_Deepseq/∆bcdpseudo.fasta", "fasta")

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ryanjhope/Documents/anaconda/lib/python2.7/site-packages/Bio/SeqIO/__init__.py", line 468, in write
    with as_handle(handle, mode) as fp:
  File "/Users/ryanjhope/Documents/anaconda/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/Users/ryanjhope/Documents/anaconda/lib/python2.7/site-packages/Bio/File.py", line 90, in as_handle
    with open(handleish, mode, **kwargs) as fp:
IOError: [Errno 2] No such file or directory: '~/Users/ryanjhope/Documents/PhD/DNA_Sequences/Genome/C. aceto_\xe2\x88\x86pyrE_\xe2\x88\x86bcd_Deepseq/\xe2\x88\x86bcdpseudo.fasta'
4

1 に答える 1

1

トレースバックはあなたの友達です:

IOError: [Errno 2] No such file or directory: '~/Users/ryanjhope ...

さらに上に:

File "/Users/ryanjhope/Documents/anaconda/lib/python2.7/site-packages/Bio/File.py", line 90, in as_handle

これは'~/Users/ vs. '/Users/`です。

次の行を変更します。

records = SeqIO.parse("~/Users/ryanjhope/Documents/PhD/DNA_Sequences/Genome/C. aceto_∆pyrE_∆bcd_Deepseq/YZ1_S11_L001_R1_001.fastq", "fastq")
count = SeqIO.write(records, "~/Users/ryanjhope/Documents/PhD/DNA_Sequences/Genome/C. aceto_∆pyrE_∆bcd_Deepseq/∆bcdpseudo.fasta", "fasta")

の中へ:

records = SeqIO.parse("/Users/ryanjhope/Documents/PhD/DNA_Sequences/Genome/C. aceto_∆pyrE_∆bcd_Deepseq/YZ1_S11_L001_R1_001.fastq", "fastq")
count = SeqIO.write(records, "/Users/ryanjhope/Documents/PhD/DNA_Sequences/Genome/C. aceto_∆pyrE_∆bcd_Deepseq/∆bcdpseudo.fasta", "fasta")

そしてさらに試みる。

于 2015-11-28T14:51:19.440 に答える