This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to use galaxy tool interval_maf_to_merged_fasta.py which is the command-line for stitch MAF blocks

I want to use the stitcher to extract a given region from MAF files, stitch it together and convert it to FASTA.

I downloaded and installed Galaxy according to the instructions from http://wiki.g2.bx.psu.edu/Admin/Get%20Galaxy

I believe the actual stitcher is interval_maf_to_merged_fasta.py in the /tools/maf directory (not clear from the paper or docs but I belive this is the tool that implements this functionality).

How can I actually extract, stitch, convert with interval_maf_to_merged_fasta.py?

I have difficulties figuring all necessary command line parameters out by reading the source code.

E.g. here I tried to get the stitched FASTA conversion for a region defined in foo.bed out of chr1.maf:

python /pub1/lvyl2012/software/lyl/galaxy/tools/maf/interval_maf_to_merged_fasta.py \
  /pub1/lvyl2012/ExtractMultipleAlignment/mulAlign/chr1.maf \
  -d hg17 \
  -t cached \
  -c 1 \
  -s 2 \
  -e 3 \
  -S 6 \
  -p hg17 \
  -m /pub1/lvyl2012/ExtractMultipleAlignment/mulAlign/ \
  -z /pub1/lvyl2012/software/lyl/galaxy/tool-data/ \
  -i /pub1/lvyl2012/ExtractMultipleAlignment/aa.bed \
  -o /pub1/lvyl2012/ExtractMultipleAlignment/results.fa

It gives the error mssage:

The MAF source specified (/pub1/lvyl2012/ExtractMultipleAlignment/mulAlign/) appears to be invalid

Is it necessary to index the MAF files first somehow? Do I have to set the type of MAF file, and to what?

Would be great if someone could give a short overview how to stitch MAF files command-line based.

alignment software-error

1 answer

I have found following command-line works. hope it helps for others

First, I use maf_build_index.py to create indexes of maf files

Then,

python interval_maf_to_merged_fasta.py \
  -d hg17 \
  -p hg17,mm5,rn3 \
  -m chr1.maf \
  -i /pub1/lvyl2012/software/lyl/galaxy/test-data/1.bed \
  -o gyh.fa \
  -t user \
  -z /pub1/lvyl2012/software/lyl/galaxy/tool-data/ \
  -c 0 \
  -s 1 \
  -e 2 \
  -S 5 \
  -I ./

Thank you very much, your comments have been a huge help to me and has saved me a lot of time

Log in to answer this question.