Question: Trouble using interval2maf.py
0
gravatar for Thomas
2.5 years ago by
Thomas0
Norwich
Thomas0 wrote:

Hello,

I have installed a copy of the main Galaxy distribution onto my local system - and am currently trying to run a few scripts associated with given Galaxy tools from the command line.

I have managed to run 'interval_maf_to_merged_fasta.py' successfully - this is the python script associated with the 'Stitch MAF blocks' tool on the web-based platform - https://github.com/galaxyproject/galaxy/blob/master/tools/maf/interval_maf_to_merged_fasta.py

However, I have ran into difficulty trying to run 'interval2maf.py' which is the python script associated with the 'Extract MAF blocks' - https://github.com/galaxyproject/galaxy/blob/master/tools/maf/interval2maf.py

I understand that in both of these scripts - the MAF files must be indexed in some way before the script can be successfully run.

Both scripts contain the following option so the script can locate custom MAF indices (i.e. not cached versions):

-I, --mafIndex=I: Path of precomputed source MAF file index, if not using cached version

However, the 'interval2maf.py' script contains an additional option not included within the previous python script.

-l, --indexLocation=l: Override default maf_index.loc file

It seems to me that the -I option and the -l option are achieving the same goal. But I know that this cannot be the case.

When I post the following command with associated options:

python interval2maf.py -d hg38 -p hg38,panTro4,ponAbe2 -m chr1_KI270707v1_random.maf -i region.bed  -o results.maf -t user -c 0 -s 1 -S 5 -e 2 -P n -r n -l maf_index -I ./

I get the following error message:

Fatal Error: The MAF source specified (user) appears to be invalid.

I have no idea why this is the case, given that I have specified the correct MAF file and the correct MAF index file. I am not sure whether I am using the -I and -l options properly - but to me they seem to be specifying the same thing'

However, if I fail to specify the -l option at all - I invoke the following error message:

Traceback (most recent call last):
  File "interval2maf.py", line 139, in <module>
    if __name__ == "__main__": __main__()
  File "interval2maf.py", line 92, in __main__
    index = maf_utilities.maf_index_by_uid( options.mafType, options.mafIndexFile )
  File "/Users/bradleyt/Documents/galaxy-master/lib/galaxy/tools/util/maf_utilities.py", line 284, in maf_index_by_uid
    for line in open( index_location_file ):
TypeError: coercing to Unicode: need string or buffer, NoneType found

I am not sure what these error messages mean, or how to resolve the problem. Any help would be greatly appreciated

galaxy tools • 740 views
ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Thomas0
1
gravatar for Thomas
2.5 years ago by
Thomas0
Norwich
Thomas0 wrote:

Problem solved (somewhat - solution not fully understood):

I had to look at the source code to solve this one. It turns out - that if you don't specify the option '--mafType = t' - then the script will will begin processing the options '--mafFile = m' and '--mafIndex = I' instead of the '--IndexLocation = l' and '--mafIndexFile = z' options which in my case, allowed the script to run to completion.

 

I am not completely sure of the logic here, but I am happy that I can get the script to run successfully now.

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Thomas0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 63 users visited in the last hour