Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • AdrianJ217
    Junior Member
    • Aug 2012
    • 9

    DE Seq

    Hi, I am new to using DE Seq. I have 2 files, output from htseq, containing the name of the genes with the # of reads next to them. One file has reads before induction of rna interference (uninduced) and another after (induced). So I want to compare the read count of each gene in both files and I believe I can do that with DE-Seq. When I read the manual, it only mentions inputting one file name in the command line in R. How do I input both files? This is my first time using DE Seq. Thank you1
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Just merge the two files. The easiest way for you to do that would be to open both in Excel and just copy and paste the second column from one of the files into the empty third column of the other. If you end up doing this sort of thing often then you can either write a small program to do that sort of thing or just do it in R.

    Don't forget to remove the "no_feature..." and similar lines from the end.

    Comment

    • AdrianJ217
      Junior Member
      • Aug 2012
      • 9

      #3
      Thank you

      Great, thank you so much, and then can you tell me what commands I need to type into R in order to run it using my file?

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        Save it as a CSV file and then follow the DESeq vignette, which is very well written.

        Comment

        • AdrianJ217
          Junior Member
          • Aug 2012
          • 9

          #5
          dpryan, thank you so much. Just one more question. You said to copy the 2nd column of one to the empty 3rd column of the other, but why wouldnt I copy both columns of one to the other, to have 4 columns. Won't they mismatch if I just copy and paste the 2nd column?

          Comment

          • ETHANol
            Senior Member
            • Feb 2010
            • 308

            #6
            Or you could run this R script to merge your HTSeq-count output files. Probably a little quicker then Excel if you have a lot of files. Anybody know how to do this with a BASH script??

            Code:
            #!/usr/bin/R
            #multimergRNA.R 
            #Ethan Ford
            #for use with ezDESeq.sh
            #Put all your output files from HTseq-count in a directory
            #change directories to that directory in BASH.
            #Run script from dirctory with your files by typing in the command line (in BASH not in R) $ Rscript path/to/this/scirpt/multimergeRNA.R
            #outputs a file called countstable.txt in the directory you ran the script from
            #The column with your gene names must have the header "gene"
            
            
            #To modify for other uses change:
            #        1)'by="gene"' to the name of the column used as a reference for merging.
            #        2)"countstable.txt" to the name of your desired outputfile
            
            multimerge = function(mypath){
            filenames=list.files(path=mypath, full.names=TRUE)
            datalist = lapply(filenames, function(x){read.delim(file=x,header=T)})
            Reduce(function(x,y) {merge(x,y,all=TRUE,by="gene",sort=FALSE)}, datalist)
            }
            merged <- multimerge(WD)
            write.table(merged, "countstable.txt", sep="\t", quote=FALSE, row.names=FALSE, na="0")
            --------------
            Ethan

            Comment

            • dpryan
              Devon Ryan
              • Jul 2011
              • 3478

              #7
              @AdrianJ217: They should be sorted the same to begin with. The DESeq vignette expects a file where the first column is the gene ID (or whatever the counts were done by) and subsequent columns are other samples. So, if you just copied both columns in then things would get more complicated.

              @ETHANol: I don't have a bash script, but I did write a program in C to do that (it also changes the label on each column so it's easier to remember what is what). I'm sure I can send you a copy if you'd like, it makes making processing pipelines a bit easier.

              Comment

              • AdrianJ217
                Junior Member
                • Aug 2012
                • 9

                #8
                dpryan, if you could send me a copy of that I'd really appreciate it. My email is:
                [email protected]

                Thank you so much!

                Comment

                • ETHANol
                  Senior Member
                  • Feb 2010
                  • 308

                  #9
                  dpryan, thanks!!! but in that I don't know any C at all, I don't think I could work it into my data analysis pipeline.
                  --------------
                  Ethan

                  Comment

                  • kopi-o
                    Senior Member
                    • Feb 2008
                    • 319

                    #10
                    Anybody know how to do this with a BASH script??
                    You should be able to just loop over all files and use the 'join' command.

                    This of course assumes that the genes are always in the same order (which they are from HTSeq) but you may get into trouble if you have, e.g., HTSeq output using different versions of GTF files (like different ENSEMBL releases), when you will lose some genes from one of the files. That's why I think it's still better to join in R, Python etc where it is easier to check that nothing gets lost.

                    Comment

                    Latest Articles

                    Collapse

                    • mylaser
                      Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                      by mylaser
                      Kheloyar – Everything You Need to Know About Kheloyaar Login and Kheoyar Id
                      If you are looking for an online gaming platform that offers a user-friendly experience, Kheloyar has become a name that many users search for. Whether you're interested in creating a new account, accessing your dashboard through Kheloyaar Login, or learning how to obtain a Kheoyar Id, understanding the platform's features and account process is essential.
                      This guide explains everything you need to know about...
                      Today, 01:13 AM
                    • SEQadmin2
                      Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                      by SEQadmin2



                      Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                      ...
                      07-09-2026, 11:10 AM
                    • SEQadmin2
                      Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                      by SEQadmin2



                      Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                      There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                      07-08-2026, 05:17 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by SEQadmin2, 07-09-2026, 10:04 AM
                    0 responses
                    11 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 07-08-2026, 10:08 AM
                    0 responses
                    9 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 07-07-2026, 11:05 AM
                    0 responses
                    17 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 07-02-2026, 11:08 AM
                    0 responses
                    31 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...