import sys
#print(sys.argv[1])
if(len(sys.argv) != 4):
print("\npython *.py <sample_list> <gtf file> <bam_dir>\n")
sys.exit()
acc_file = sys.argv[1]
gtf = sys.argv[2]
bam_dir = sys.argv[3]
with open(acc_file) as acc_file_handle:
for line in acc_file_handle:
line = line.rstrip()
cmd_str = "htseq-count -f bam -r pos {bam_dir}/{sample}.bam {gtf} > {sample}.count.tab".format(bam_dir = bam_dir, sample = line, gtf=gtf)
print(cmd_str)
网友评论