bankDensityProfile           package:GeneR           R Documentation

_C_o_m_p_u_t_e_s _d_e_n_s_i_t_y _p_r_o_f_i_l_e(_s) _o_f _a _b_a_n_k _o_f _f_a_s_t_a _s_e_q_u_e_n_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Computes profile(s) of user defined quantities from the begining
     or the end of sequence fragments.

     Profile(s) is(are) constituted of bins of equal size with the
     mean, the standard deviation and the number  of valid events for
     each bin.

_U_s_a_g_e:

     bankDensityProfile (file, seqno=0, fun=seqSkew, fileout= NULL, nbin,
                         sizeBin, allSeq=FALSE, fromEnd=FALSE, name = "all",
                         threshold=0, strand=getStrand(),accu=FALSE,case="all")

_A_r_g_u_m_e_n_t_s:

    file: Integer/scalar, File name of the bank (fasta file)

   seqno: Integer/scalar, Sequence number (buffer number)

  strand: Integer/scalar, Strand (forward: 0, reverse: 1)

     fun: Function, Function to be used (for example seqSkew

 fileout: String/scalar, If not NULL, a file to write results

    nbin: Integer/scalar, Number of bins to be created before the
          origin

 sizeBin: Integer/scalar, Size of the bins

  allSeq: Logical/scalar, If TRUE, Imput sequence is the whole
          sequence, if FALSE, input is only the half sequence

 fromEnd: Logical/scalar, TRUE: Origin is the end of each sequence,  if
          FALSE: Origin is the begining of each sequence 

    name: String/vector, Names of sequences in bank file, "all": uses
          all sequences of the bank

threshold: Integer/scalar, For each bin, maximum number of N tolerated
          in the sequence to participate  to the computation

    case: String/scalar, Case of the letters taken into account ("all",
          "upper", "lower")

    accu: Flag, if true, returns sum , sum of square, and count on
          demanding function; else returns, mean and standard error on
          mean.

_V_a_l_u_e:

     a list of matrices, with the mean(s), the standard deviation(s)
     and the number of valid sub-fragments in each bin.

_A_u_t_h_o_r(_s):

     Emna Marrakchi and Antoine Lucas

_S_e_e _A_l_s_o:

     'densityProfile','bankSummary','GCcontent','seqSkew'

_E_x_a_m_p_l_e_s:

       ## We create 2 banks
       for(i in 1:10)
       {
         s=randomSeq(n=100)
         placeString(s,seqno=0)
         writeFasta("toto_norm.fa",append=TRUE,name=i)

         s=randomSeq(prob=c(0.3,1,1,1,0)/3.3,n=100)
         placeString(s,seqno=0)
         writeFasta("toto_lowT.fa",append=TRUE,name=i)
       }

       densNorm <- bankDensityProfile("toto_norm.fa",nbin=10,sizeBin=10,allSeq=TRUE)
       densLowT <- bankDensityProfile("toto_lowT.fa",nbin=10,sizeBin=10,allSeq=TRUE)

       par(mfrow=c(1,2))
       ## Plot skew in normal bank
       plot(densNorm$skta,main="TA skew Normal bank",ylim=c(-0.8,0.3))

       ## Plot skew in low T bank
       plot(densLowT$skta,main="TA skew low T bank",ylim=c(-0.8,0.3))

       ## Show numbers
       densLowT

