python19

作者: rong酱 | 来源:发表于2021-12-09 14:16 被阅读0次
    # -*- 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
    

    相关文章

      网友评论

          本文标题:python19

          本文链接:https://www.haomeiwen.com/subject/qeeffrtx.html