我尝试___name__在我的python脚本的开头使用:
#!/usr/bin/python
# Comments...
# blabla
#
__name__="cigarline_by_pos.py"
__synopsis__ = "cigarline_by_pos.py | INPUT_BAM_FILE --output OUTPUT_FILE [--output OUTPUT_FILE_R2 --readsplit]"
__example__ = "cigarline_by_pos.py hg18.bam --output hg18_read1.csv --output hg18_read2.csv --readsplit"
__date__ = "05/2013"
__authors__ = "Frederic Escudie & Antoine Leleu"
__keywords__ = "SAM Alignment"
__description__ = "Sum by position the status of reads. This provides for example the number of reads that have a mismatch at first base."
__version__ = '2.3.1'
import argparse,re,sys
the rest of the code...
Run Code Online (Sandbox Code Playgroud)
但随后Python打印出一个警告:
cigarline_by_pos.py:29: RuntimeWarning: …Run Code Online (Sandbox Code Playgroud)