def parsing_plot_orf_density():
parser = argparse.ArgumentParser(
description="This script is designed for plot the P-site profile of specified ORF."
)
parser.add_argument("-a","--annot_dir",dest="annot_dir",required=True,type=str,
help="transcripts annotation directory, generated by prepare_transcripts.")
parser.add_argument("-c","--config_file",dest="config_file",required=True,
help="defile bam file information in this file, \
please refer to the example file in data folder.",type=str)
parser.add_argument("-t","--transcript_id",dest="transcript_id",required=True,type=str,
help="the transcript id")
parser.add_argument("-s","--orf_tstart",dest="orf_tstart",required=True,type=int,
help="transcript-level coordinates of start of ORF (orf_tstart)")
parser.add_argument("-e","--orf_tstop",dest="orf_tstop",required=True,type=int,
help="transcript-level coordinates of end of ORF (orf_tstop)")
parser.add_argument("-o","--outname",dest="outname",required=False,type=str,default="",
help="output file name,default is transcriptid_tstart_tstop.pdf")
parser.add_argument('-V',"--version",action="version",version=__version__)
args = parser.parse_args()
args.orf_tstart = args.orf_tstart -1 # change to 0 based
if not os.path.exists(args.annot_dir):
raise ValueError("Error, the transcript annotation directory not found: {} \n \
pls run prepare_transcripts.py first. ".format(args.annot_dir))
return args
评论列表
文章目录