Mercurial > repos > rmarenco > hubarchivecreator
comparison util/subtools.py @ 10:acc233161f50 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
author | rmarenco |
---|---|
date | Thu, 21 Jul 2016 05:58:51 -0400 |
parents | fb5e60d4d18a |
children | 25809f699cb3 |
comparison
equal
deleted
inserted
replaced
9:4f9847539a28 | 10:acc233161f50 |
---|---|
37 array_call = ['twoBitInfo', two_bit_file_name, two_bit_info_file] | 37 array_call = ['twoBitInfo', two_bit_file_name, two_bit_info_file] |
38 p = _handleExceptionAndCheckCall(array_call) | 38 p = _handleExceptionAndCheckCall(array_call) |
39 return p | 39 return p |
40 | 40 |
41 | 41 |
42 def faToTwoBit(fasta_file_name, mySpecieFolder): | 42 def faToTwoBit(fasta_file_name, twoBitFile): |
43 """ | 43 """ |
44 This function call faToTwoBit UCSC tool, and return the twoBitFile | 44 This function call faToTwoBit UCSC tool, and return the twoBitFile |
45 :param fasta_file_name: | 45 :param fasta_file_name: |
46 :param mySpecieFolder: | 46 :param mySpecieFolder: |
47 :return: | 47 :return: |
48 """ | 48 """ |
49 baseNameFasta = os.path.basename(fasta_file_name) | |
50 suffixTwoBit, extensionTwoBit = os.path.splitext(baseNameFasta) | |
51 nameTwoBit = suffixTwoBit + '.2bit' | |
52 | 49 |
53 with open(os.path.join(mySpecieFolder, nameTwoBit), 'w') as twoBitFile: | 50 array_call = ['faToTwoBit', fasta_file_name, twoBitFile] |
54 array_call = ['faToTwoBit', fasta_file_name, twoBitFile.name] | 51 _handleExceptionAndCheckCall(array_call) |
55 _handleExceptionAndCheckCall(array_call) | |
56 | 52 |
57 return twoBitFile | 53 return twoBitFile |
58 | 54 |
59 | 55 |
60 def gtfToGenePred(input_gtf_file_name, gene_pred_file_name): | 56 def gtfToGenePred(input_gtf_file_name, gene_pred_file_name): |