Menu

assembleMTgenome.py

Tom Brumby
2014-10-28
2014-11-03
  • Tom Brumby

    Tom Brumby - 2014-10-28

    Hey me again! So I am trying to run the assembleMTgenome.py program using a sam file. I have renamed the sam file STE99BLOOD.sam to comply with the file name instructions however, I get this error

    Traceback (most recent call last):
    File "/data_fedor12/common_scripts/mtoolbox/MToolBox_v0.2/assembleMTgenome.py", line 124, in <module>
    sample_name = os.getcwd().split('/')[-1].split('_')[1]
    IndexError: list index out of range

    I am have experimented with various different inputs and and go the same error but generally i have been inputting something along the lines of:

    assembleMTgenome.py -f /data_fedor12/common_data/GENOMES/H_sapiens/Mitochondrial_rCRS -i sam -a /data_fedor12/common_data/GENOMES/H_sapiens/g1k_v37/reference/human_g1k_v37.fasta -s /data_fedor12/common_scripts/samtools STE99BLOOD.sam

     
    • Claudia Calabrese

      Hi Tom,

      I'm Claudia, one of the MToolBox developers. Thank you for using MToolBox.
      I think that you could have a problem with the sample name identification, because with the -i option you should state the full name of your sample and not simply the type of file. Furthermore, you could also use the -r option for the path to fasta reference genomes, while -f and -a to state the mitochondrial and human+mitochondrial reference fasta genome, respectively. Lastly, you could also use -FCP in your command line, to enable the generation of several output files.

      Could you please re-try in this way:

      assembleMTgenome.py -f /data_fedor12/common_data/GENOMES/H_sapiens/Mitochondrial_rCRS.fasta -i STE99BLOOD.sam -a /data_fedor12/common_data/GENOMES/H_sapiens/g1k_v37/reference/human_g1k_v37.fasta -s /data_fedor12/common_scripts/samtools

      Please, don't hesitate to ask any other question about this problem.
      Thanks
      Claudia

       
  • Tom Brumby

    Tom Brumby - 2014-11-03

    Thank you for the help. So i am inputting:

    assembleMTgenome.py -f /Mitochondrial_rCRS/chrRCRS.fa -i /data_fedor12/Projects/mitos_tom/SAM_files_MT/STE0099_a/STE99BLOOD.sam -a /g1k_v37/reference/human_g1k_v37.fasta -s /data_fedor13/common_scripts/samtools -r '/data_fedor12/common_data/GENOMES/H_sapiens' -F /data_fedor12/Projects/mitos_tom/SAM_files_MT/STE0099_a/assembleMTgenome_output.fasta -C /data_fedor12/Projects/mitos_tom/SAM_files_MT/STE0099_a/assembleMTgenome_coveragefile
    -P /data_fedor12/Projects/mitos_tom/SAM_files_MT/STE0099_a/assembleMTgenome_stats

    And get this error

    Traceback (most recent call last):
    File "/data_fedor12/common_scripts/mtoolbox/MToolBox_v0.2/assembleMTgenome.py", line 488, in <module>
    VCF_dict.update(mut_events)
    NameError: name 'mut_events' is not defined

     
  • Claudia Calabrese

    Hi Tom,
    you can have this error if:
    1) there are some problems in recognizing the reference fasta files to be used for assembly
    2) there's something strange with your input sam file
    Furthermore the -FCP options are actually boolean, so you don't need to specify anything else.
    To be clearer, let's say for example that /data_fedor12/common_data/GENOMES/H_sapiens/ is the directory with your chrRCRS.fa (mitochondrial) and hg19RCRS.fa (nuclear+mitochondrial) fasta files, you should use the assemblyMTgenome script in this way (assuming that you've done the export path of the MToolBox directory already):

    assembleMTgenome.py -i STE99BLOOD.sam -r /data_fedor12/common_data/GENOMES/H_sapiens/ -f chrRCRS.fa -a hg19RCRS.fa -s /data_fedor13/common_scripts/samtools -FCP > logassemble.txt

    If this doesn't work, could you kindly send me your sam file (see my email account in the "CONTACTS AND CITATION" section of the README) and we'll go through your file to see what's wrong.

    Thanks
    Claudia

     

    Last edit: Claudia Calabrese 2014-11-03

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.