Parallelize microRNA targets
0
0
Entering edit mode
7 days ago
aranyak111 • 0

I am trying to look for miRNA targets using a file called Conservedfamily.txt from the Zebrafish target scan fish website. I have a python program written to extract each of the miRNAs which works fine. However, for a big list of microRNAs, I must provide a name every time in line 22 and get one individual output file. I am thinking is there any way to parallelize the process so that somehow, I can provide a list of all microRNAs and obtain all my targets at the same time. The python code is attached below

#!/usr/bin/python

#Import relevant modules

import sys

conservedfamily = open(sys.argv[1], 'r')
targetgenelist = open(sys.argv[2], 'w')
targetgeneid = open(sys.argv[3], 'w')

geneid = []

targetgenelist.write('miR family' + '\t' + 'Gene ID' + '\t' + 'Gene Symbol' + '\t' + 'Transcript ID' + '\t' + 'Species ID' + '\t' + 'UTR start' + '\t' + 'UTR end' + '\t' + 'MSA start' + '\t' + 'MSA end' + '\t' + 'Seed match' + '\n')

for line in conservedfamily:
  splitline = line.strip().split('\t')

  if splitline[0] == 'miR-210':
    targetgenelist.write(line)
    if not splitline[1] in geneid:
      geneid.append(splitline[1])
      targetgeneid.write(splitline[1] + '\n')

conservedfamily.close()
targetgenelist.close()
targetgeneid.close()
python miR99target.py 'Conserved_Family_Info.txt' 'miR-210targetlist.txt' 'miR-210targetid.txt'
RNA-Seq • 104 views
ADD COMMENT
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 1600 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6