Wondering how to look at the reads of a gene in samples to check if it was knocked out?
2
0
Entering edit mode
Lillian • 0
@c209ec01
Last seen 10 months ago
United States

I have two groups of samples, one was control samples and the other was experimental samples where the gene was knocked out.

I'm wondering if there is any way that I could check if the gene in the was knocked out in the experimental samples?

I have tried to use DESeq2 to check the gene expression, but not sure if this was sufficient enough.

knockout DESeq2 • 702 views
ADD COMMENT
0
Entering edit mode

How to setting? Players have generally had good things to say about taylor swift 2048.

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States

Sure. You can use either Gviz or ggbio for that. Here is a reproducible example that you can use as an example. Please note that I am using bam files that come as part of a package for reproducibility, but you will instead point to your actual bam files, and will use whatever TxDb package is correct for your species.

> library(ggbio)
> library(TxDb.Dmelanogaster.UCSC.dm3.ensGene)

## we'll use passillaBamSubset for the data, for reproducibility

> library(pasillaBamSubset)

## There are two functions that just return the file locations
## you won't do any of this with your data, but I don't have your data so...

> fls <- c(untreated1_chr4(), untreated3_chr4())
> fls
[1] "C:/Users/jmacdon/AppData/Local/R/win-library/4.3/pasillaBamSubset/extdata/untreated1_chr4.bam"
[2] "C:/Users/jmacdon/AppData/Local/R/win-library/4.3/pasillaBamSubset/extdata/untreated3_chr4.bam"

## instead of the above, you will instead just create a character vector with the names of your bam files.

> gns <- genes(TxDb.Dmelanogaster.UCSC.dm3.ensGene)

## The pasillaBamSubset files are aligned to the dm3 Drosophila genome, and
## they ONLY include chr4, so we have to subset the genes to chr4 as well.
## You shouldn't need to do this either

> gns2 <- keepSeqlevels(gns, "chr4", pruning.mode = "coarse")
> gns2
GRanges object with 93 ranges and 1 metadata column:
              seqnames          ranges strand |     gene_id
                 <Rle>       <IRanges>  <Rle> | <character>
  FBgn0002521     chr4 1193094-1202271      - | FBgn0002521
  FBgn0004607     chr4   522436-560418      + | FBgn0004607
  FBgn0004859     chr4     68336-77667      - | FBgn0004859
  FBgn0005558     chr4   718315-741787      + | FBgn0005558
  FBgn0005561     chr4 1109444-1133943      + | FBgn0005561
          ...      ...             ...    ... .         ...
  FBgn0263851     chr4     86203-86271      - | FBgn0263851
  FBgn0264607     chr4 1055914-1074329      - | FBgn0264607
  FBgn0264616     chr4   153300-153500      - | FBgn0264616
  FBgn0264617     chr4     77123-83750      + | FBgn0264617
  FBgn0264618     chr4   577651-578480      - | FBgn0264618
  -------
  seqinfo: 1 sequence from dm3 genome

## Now make a plot of the gene region we care about - I am choosing the first one above
## But obviously you will choose the gene you are interested in (that's the 'which' argument, below).

> gn <- autoplot(TxDb.Dmelanogaster.UCSC.dm3.ensGene, which = gns2[1])
Parsing transcripts...
Parsing exons...
Parsing cds...
Parsing utrs...
------exons...
------cdss...
------introns...
------utr...
aggregating...
Done
Constructing graphics...

## Now coverage plots for all the bam files. Again, I use the 'which' argument to 
## indicate where I want the coverage to come from

> covlst <- lapply(fls, autoplot, which = gns2[1])
reading in as Bamfile
Parsing raw coverage...
Read GAlignments from BamFile...
extracting information...
reading in as Bamfile
Parsing raw coverage...
Read GAlignments from BamFile...
extracting information...

## make the plot

> trk <- tracks(c(list(gn), covlst), xlim = c(start(gns2[1]), end(gns2[1])))

## and plot it

> trk
ADD COMMENT
0
Entering edit mode

As an aside, do note that 'knocked out' in general doesn't mean 'precluded from making any transcript'. Instead, it's usually an insertion of a stop codon that precludes the production of functional protein. You should therefore have some coverage in the gene region that precedes the inserted stop codon.

ADD REPLY
0
Entering edit mode
Piero ▴ 10
@a277a51e
Last seen 8 weeks ago
Peru

Check the vignette of the GenomicFiles package. There are functions like reduceByrange() that can help you know that information for a specific genomic range like a gene.

ADD COMMENT

Login before adding your answer.

Traffic: 773 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6