Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bio_jit
    Member
    • Jun 2013
    • 13

    #1

    ShortRead ,WriteFastq File?

    oparetingSystem windows7, 64bit, sp1
    R.Version = 3.0.2
    biocVersion = 1.12.0

    I made random sample by using ShortRead, FastqSampler

    >sampler<- FastqSampler("./Sequencing/ERR127306_1.fastq.gz")
    Fq<-yield(sampler)

    now I want to write this in a fatsq file and save how to do?
    i did
    writeFastq(object="Fq", file="./Sequencing/sample.fastq", mode="w")
    and get error

    Error in (function (classes, fdef, mtable) :
    unable to find an inherited method for function ‘writeFastq’ for signature ‘"character", "character"’

    any body plz. help I need it badly; please mind that I am a new comer in this area so kindly explain what you are doing.
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Try:
    Code:
    writeFastq(object=Fq, file="./Sequencing/sample.fastq", mode="w")
    The quotes around "Fq" make it a character vector rather than an object.

    Comment

    • bio_jit
      Member
      • Jun 2013
      • 13

      #3
      Thanks ! thank you a lot ! u saved me!
      Last edited by bio_jit; 02-26-2014, 11:39 PM.

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        No worries, glad you got things working!

        Comment

        • bio_jit
          Member
          • Jun 2013
          • 13

          #5
          Help Plz!

          Hi Ryan ,

          sorry to disturb you once again but I just stuck. Plz. help me

          I got a small program to spit a big fatsq files in 100000 reads/file and put them new names automatically. The program is working nice but I want to save the files in other folder , say ./Sequencing/output. tried several ways but not working. plz. help

          my program


          # set the file
          FastqFile <- "./Sequencing/ERR127306_1.fastq.gz"
          fileBaseName <- sub(".fastq$","", FastqFile)
          # iterate over fastq file
          f <- FastqStreamer(FastqFile, 1000000)
          file_index <- 0
          while (length(fq <- yield(f))) {
          newName <- paste( fileBaseName, "_", file_index,".fastq", sep="")
          writeFastq(fq, file=newName)
          file_index <- file_index + 1
          }
          close(f)

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            Just put the directory in the "newName" string. So:

            Code:
             newName <- paste(newDirectory, "/", fileBaseName, "_", file_index,".fastq", sep="")

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
              by SEQadmin2



              Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

              Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
              ...
              10-14-2026, 09:55 AM
            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              09-28-2026, 10:25 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 10-22-2026, 11:13 AM
            0 responses
            24 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-22-2026, 10:48 AM
            0 responses
            20 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-15-2026, 10:52 AM
            0 responses
            36 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            42 views
            0 reactions
            Last Post SEQadmin2  
            Working...