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

            • kinpict.com
              Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by kinpict.com
              The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
              Today, 06:37 PM
            • SEQadmin2
              16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by SEQadmin2





              NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
              10-30-2026, 06:46 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 11-12-2026, 07:59 AM
            0 responses
            27 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-05-2026, 09:25 AM
            0 responses
            35 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-03-2026, 11:54 AM
            2 responses
            56 views
            0 reactions
            Last Post kinpict.com  
            Started by SEQadmin2, 10-28-2026, 09:57 AM
            0 responses
            175 views
            0 reactions
            Last Post SEQadmin2  
            Working...