python19

2021-12-09  本文已影响0人  rong酱
# -*- coding: utf-8 -*-


import os
import sys
import argparse
import numpy as np

inputfile=sys.argv[1]
outputfile=sys.argv[2]

countup=0
countdown=0

outputcon=open(outputfile,'w')

with open(inputfile,'r') as DE:
    DEli = DE.readlines()
    print(DEli[0].strip().split("\t")[4])
    print(DEli[0].strip().split("\t")[6])
    for DElin in DEli[1:]:
        DEline=DElin.strip().split("\t")
        print(str(DEline))
        print(DEline[4])
        print(DEline[6])
        FC=str(DEline[4])
        FDR=str(DEline[6])
        if FDR=='' or FC== '':
            continue
        else:
            FC=float(FC)
            FDR=float(FDR)
            if FC>1 and FDR<0.05:
                countup+=1
            elif FC<-1 and FDR<0.05:
                countdown+=1
outputcon.write("up"+"\t"+str(countup))
outputcon.write("down"+"\t"+str(countdown))
awk -F ':'  '$2>100{print $0}'

awk -F "\t" '$8="Up" {print $0}' c-vs-T.DEseq2.xls

awk -F '\t' '$2>1 && padj<0.05 {print $0}' deseq2.output  | wc -l
上一篇下一篇

猜你喜欢

热点阅读