if i > 0:
sys.stdout.write(', ')
sys.stdout.write( str(slices[i][0]+1) + '-' + str(slices[i][1]+1) )
- s = s + upper(sequence[slices[i][0]:(slices[i][1]+1)])
- if i < len(slices)-1:
- s = s + lower(sequence[(slices[i][1]+1):(slices[i+1][0])])
- elif slices[i][1] < len(sequence)-1:
- s = s + lower(sequence[(slices[i][1]+1):(len(sequence))])
+
print ''
- print s
except:
print '\nDisEMBL.py sequence_file \n'
print 'A default run would be: ./DisEMBL.py fasta_file'
- print 'Mode: "default"(nothing) or "scores" which will give scores per residue in TAB seperated format'
raise SystemExit
#db = sys.stdin
parser = Fasta.RecordParser()
REM465_smooth = SavitzkyGolay(smooth_frame,0,REM465_raw)
COILS_smooth = SavitzkyGolay(smooth_frame,0,COILS_raw)
HOTLOOPS_smooth = SavitzkyGolay(smooth_frame,0,HOTLOOPS_raw)
- if mode == 'default':
- sys.stdout.write('> '+cur_record.title+'_COILS ')
- reportSlicesTXT( getSlices(COILS_smooth, fold_coils, join_frame, peak_frame, 0.43), sequence )
- sys.stdout.write('> '+cur_record.title+'_REM465 ')
- reportSlicesTXT( getSlices(REM465_smooth, fold_rem465, join_frame, peak_frame, 0.50), sequence )
- sys.stdout.write('> '+cur_record.title+'_HOTLOOPS ')
- reportSlicesTXT( getSlices(HOTLOOPS_smooth, fold_hotloops, join_frame, peak_frame, 0.086), sequence )
- sys.stdout.write('\n')
- elif mode == 'scores':
- sys.stdout.write('> '+cur_record.title+'\n')
- sys.stdout.write('# RESIDUE COILS REM465 HOTLOOPS\n')
- for i in range(len(REM465_smooth)):
- sys.stdout.write(sequence[i]+'\t'+fpformat.fix(COILS_smooth[i],5)+'\t'+fpformat.fix(REM465_smooth[i],5)+'\t'+fpformat.fix(HOTLOOPS_smooth[i],5)+'\n')
- else:
- sys.stderr.write('Wrong mode given: '+mode+'\n')
- raise SystemExit
+
+ sys.stdout.write('> '+cur_record.title+'\n')
+ sys.stdout.write('# COILS ')
+ reportSlicesTXT( getSlices(COILS_smooth, fold_coils, join_frame, peak_frame, 0.43), sequence )
+ sys.stdout.write('# REM465 ')
+ reportSlicesTXT( getSlices(REM465_smooth, fold_rem465, join_frame, peak_frame, 0.50), sequence )
+ sys.stdout.write('# HOTLOOPS ')
+ reportSlicesTXT( getSlices(HOTLOOPS_smooth, fold_hotloops, join_frame, peak_frame, 0.086), sequence )
+ sys.stdout.write('# RESIDUE COILS REM465 HOTLOOPS\n')
+ for i in range(len(REM465_smooth)):
+ sys.stdout.write(sequence[i]+'\t'+fpformat.fix(COILS_smooth[i],5)+'\t'+fpformat.fix(REM465_smooth[i],5)+'\t'+fpformat.fix(HOTLOOPS_smooth[i],5)+'\n')
except AttributeError:
break
file.close()