PLoS One. 2013;8(3):e59582. doi: 10.1371/journal.pone.0059582.
AWS r5.2xlarge and CentOS linux 7 on a Virtual Machine
-rw-r–r– 1 ubuntu ubuntu 915931500 Mar 13 2016 genome.1.ht2
-rw-r–r– 1 ubuntu ubuntu 682465208 Mar 13 2016 genome.2.ht2
-rw-r–r– 1 ubuntu ubuntu 1320164 Mar 13 2016 genome.3.ht2
-rw-r–r– 1 ubuntu ubuntu 682465202 Mar 13 2016 genome.4.ht2
-rw-r–r– 1 ubuntu ubuntu 1222786247 Mar 13 2016 genome.5.ht2
-rw-r–r– 1 ubuntu ubuntu 694908640 Mar 13 2016 genome.6.ht2
-rw-r–r– 1 ubuntu ubuntu 8 Mar 13 2016 genome.7.ht2
-rw-r–r– 1 ubuntu ubuntu 8 Mar 13 2016 genome.8.ht2
-rwxr-xr-x 1 ubuntu ubuntu 1341 Mar 17 2016 make_rn6.sh
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr 10 02:48 f344_pfc_nicotine
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr 10 03:28 f344_pfc_saline
-rw-rw-r– 1 ubuntu ubuntu 1918376826 Apr 7 13:08 SRR869032.sra
-rw-rw-r– 1 ubuntu ubuntu 1512702873 Apr 10 03:07 SRR869032_1.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 1565027421 Apr 10 03:07 SRR869032_2.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 1989086241 Apr 7 13:09 SRR869033.sra
-rw-rw-r– 1 ubuntu ubuntu 1559510818 Apr 10 03:11 SRR869033_1.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 1612258618 Apr 10 03:11 SRR869033_2.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 1978327667 Apr 7 13:10 SRR869034.sra
-rw-rw-r– 1 ubuntu ubuntu 1568979784 Apr 10 03:12 SRR869034_1.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 1615385331 Apr 10 03:12 SRR869034_2.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 2681330074 Apr 7 12:59 SRR869044.sra
-rw-rw-r– 1 ubuntu ubuntu 2119745955 Apr 10 03:10 SRR869044_1.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 2202580482 Apr 10 03:10 SRR869044_2.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 2709383194 Apr 7 13:01 SRR869045.sra
-rw-rw-r– 1 ubuntu ubuntu 2103892097 Apr 10 03:12 SRR869045_1.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 2198363062 Apr 10 03:12 SRR869045_2.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 2614023328 Apr 7 13:02 SRR869046.sra
-rw-rw-r– 1 ubuntu ubuntu 2054942375 Apr 10 03:13 SRR869046_1.fastq.gz
-rw-rw-r– 1 ubuntu ubuntu 2138446269 Apr 10 03:13 SRR869046_2.fastq.gz
~/results/rnaseq/Rn/hisat_rat$ hisat2 -p 8 --rna-strandness RF --dta -x ~/genomeAndIndices/Rn/hisat/genome -p 8 -1 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_nicotine/SRR869032_1.fastq.gz -2 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_nicotine/SRR869032_2.fastq.gz -S pfc_nicotine_1.sam --summary-file pfc_nicotine_1_alignStats.txt
28929485 reads; of these:
28929485 (100.00%) were paired; of these:
5234698 (18.09%) aligned concordantly 0 times
22040215 (76.19%) aligned concordantly exactly 1 time
1654572 (5.72%) aligned concordantly >1 times
----
5234698 pairs aligned concordantly 0 times; of these:
202195 (3.86%) aligned discordantly 1 time
----
5032503 pairs aligned 0 times concordantly or discordantly; of these:
10065006 mates make up the pairs; of these:
7450169 (74.02%) aligned 0 times
2328861 (23.14%) aligned exactly 1 time
285976 (2.84%) aligned >1 times
87.12% overall alignment rate
~/results/rnaseq/Rn/hisat_rat$ hisat2 -p 8 --rna-strandness RF --dta -x ~/genomeAndIndices/Rn/hisat/genome -p 8 -1 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_nicotine/SRR869033_1.fastq.gz -2 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_nicotine/SRR869033_2.fastq.gz -S pfc_nicotine_2.sam --summary-file pfc_nicotine_2_alignStats.txt
30057458 reads; of these:
30057458 (100.00%) were paired; of these:
5894947 (19.61%) aligned concordantly 0 times
22432973 (74.63%) aligned concordantly exactly 1 time
1729538 (5.75%) aligned concordantly >1 times
----
5894947 pairs aligned concordantly 0 times; of these:
195135 (3.31%) aligned discordantly 1 time
----
5699812 pairs aligned 0 times concordantly or discordantly; of these:
11399624 mates make up the pairs; of these:
8870697 (77.82%) aligned 0 times
2245816 (19.70%) aligned exactly 1 time
283111 (2.48%) aligned >1 times
85.24% overall alignment rate
~/results/rnaseq/Rn/hisat_rat$ hisat2 -p 8 --rna-strandness RF --dta -x ~/genomeAndIndices/Rn/hisat/genome -p 8 -1 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_nicotine/SRR869033_1.fastq.gz -2 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_nicotine/SRR869033_2.fastq.gz -S pfc_nicotine_3.sam --summary-file pfc_nicotine_3_alignStats.txt
30057458 reads; of these:
30057458 (100.00%) were paired; of these:
5894947 (19.61%) aligned concordantly 0 times
22432973 (74.63%) aligned concordantly exactly 1 time
1729538 (5.75%) aligned concordantly >1 times
----
5894947 pairs aligned concordantly 0 times; of these:
195135 (3.31%) aligned discordantly 1 time
----
5699812 pairs aligned 0 times concordantly or discordantly; of these:
11399624 mates make up the pairs; of these:
8870697 (77.82%) aligned 0 times
2245816 (19.70%) aligned exactly 1 time
283111 (2.48%) aligned >1 times
85.24% overall alignment rate
-rw-rw-r– 1 ubuntu ubuntu 14838204512 Apr 11 04:04 pfc_nicotine_1.sam
-rw-rw-r– 1 ubuntu ubuntu 636 Apr 11 04:04 pfc_nicotine_1_alignStats.txt
-rw-rw-r– 1 ubuntu ubuntu 15315339149 Apr 11 04:06 pfc_nicotine_2.sam
-rw-rw-r– 1 ubuntu ubuntu 636 Apr 11 04:06 pfc_nicotine_2_alignStats.txt
-rw-rw-r– 1 ubuntu ubuntu 15315339149 Apr 11 04:07 pfc_nicotine_3.sam
-rw-rw-r– 1 ubuntu ubuntu 636 Apr 11 04:07 pfc_nicotine_3_alignStats.txt
~/results/rnaseq/Rn/hisat_rat$ hisat2 -p 8 --rna-strandness RF --dta -x ~/genomeAndIndices/Rn/hisat/genome -p 8 -1 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_saline/SRR869044_1.fastq.gz -2 ~/data/rnaseq/Rn/PLoS-One-8-e59582/f344_pfc_saline/SRR869044_2.fastq.gz -S pfc_saline_1.sam --summary-file pfc_saline_1_alignStats.txt
41584891 reads; of these:
41584891 (100.00%) were paired; of these:
6989893 (16.81%) aligned concordantly 0 times
32175699 (77.37%) aligned concordantly exactly 1 time
2419299 (5.82%) aligned concordantly >1 times
----
6989893 pairs aligned concordantly 0 times; of these:
286173 (4.09%) aligned discordantly 1 time
----
6703720 pairs aligned 0 times concordantly or discordantly; of these:
13407440 mates make up the pairs; of these:
9651125 (71.98%) aligned 0 times
3345545 (24.95%) aligned exactly 1 time
410770 (3.06%) aligned >1 times
88.40% overall alignment rate
40866035 reads; of these:
40866035 (100.00%) were paired; of these:
8541201 (20.90%) aligned concordantly 0 times
30095075 (73.64%) aligned concordantly exactly 1 time
2229759 (5.46%) aligned concordantly >1 times
----
8541201 pairs aligned concordantly 0 times; of these:
288626 (3.38%) aligned discordantly 1 time
----
8252575 pairs aligned 0 times concordantly or discordantly; of these:
16505150 mates make up the pairs; of these:
12941288 (78.41%) aligned 0 times
3176429 (19.25%) aligned exactly 1 time
387433 (2.35%) aligned >1 times
84.17% overall alignment rate
39370935 reads; of these:
39370935 (100.00%) were paired; of these:
6881431 (17.48%) aligned concordantly 0 times
30167116 (76.62%) aligned concordantly exactly 1 time
2322388 (5.90%) aligned concordantly >1 times
----
6881431 pairs aligned concordantly 0 times; of these:
266341 (3.87%) aligned discordantly 1 time
----
6615090 pairs aligned 0 times concordantly or discordantly; of these:
13230180 mates make up the pairs; of these:
9648395 (72.93%) aligned 0 times
3185174 (24.08%) aligned exactly 1 time
396611 (3.00%) aligned >1 times
87.75% overall alignment rate
-rw-rw-r– 1 ubuntu ubuntu 21466504794 Apr 11 03:14 pfc_saline_1.sam
-rw-rw-r– 1 ubuntu ubuntu 636 Apr 11 03:14 pfc_saline_1_alignStats.txt
-rw-rw-r– 1 ubuntu ubuntu 20624784869 Apr 11 03:31 pfc_saline_2.sam
-rw-rw-r– 1 ubuntu ubuntu 637 Apr 11 03:31 pfc_saline_2_alignStats.txt
-rw-rw-r– 1 ubuntu ubuntu 20261146118 Apr 11 03:37 pfc_saline_3.sam
-rw-rw-r– 1 ubuntu ubuntu 636 Apr 11 03:37 pfc_saline_3_alignStats.txt
[bam_sort_core] merging from 38 files…
[bam_sort_core] merging from 37 files…
[bam_sort_core] merging from 36 files…
[bam_sort_core] merging from 27 files…
[bam_sort_core] merging from 28 files…
[bam_sort_core] merging from 28 files…
-rw-rw-r– 1 ubuntu ubuntu 2759958955 Apr 11 04:51 pfc_nicotine_1.bam
-rw-rw-r– 1 ubuntu ubuntu 2828178844 Apr 11 04:53 pfc_nicotine_2.bam
-rw-rw-r– 1 ubuntu ubuntu 2828181083 Apr 11 04:53 pfc_nicotine_3.bam
-rw-rw-r– 1 ubuntu ubuntu 3801587158 Apr 11 05:00 pfc_saline_1.bam
-rw-rw-r– 1 ubuntu ubuntu 3782938510 Apr 11 05:00 pfc_saline_2.bam
-rw-rw-r– 1 ubuntu ubuntu 3713539755 Apr 11 04:59 pfc_saline_3.bam
~/hisat_rat$ stringtie aligned_bam/pfc_saline_1.bam -p 8 --rf -o assembled_transcripts/pfc_saline_1.gtf
~/hisat_rat$ stringtie aligned_bam/pfc_saline_2.bam -p 8 --rf -o assembled_transcripts/pfc_saline_2.gtf
~/hisat_rat$ stringtie aligned_bam/pfc_saline_3.bam -p 8 --rf -o assembled_transcripts/pfc_saline_3.gtf
~/hisat_rat$ stringtie aligned_bam/pfc_nicotine_1.bam -p 8 --rf -o assembled_transcripts/pfc_nicotine_1.gtf
~/hisat_rat$ stringtie aligned_bam/pfc_nicotine_2.bam -p 8 --rf -o assembled_transcripts/pfc_nicotine_2.gtf
~/hisat_rat$ stringtie aligned_bam/pfc_nicotine_3.bam -p 8 --rf -o assembled_transcripts/pfc_nicotine_3.gtf
-rw-rw-r– 1 ubuntu ubuntu 49647976 Apr 11 12:57 pfc_nicotine_1.gtf
-rw-rw-r– 1 ubuntu ubuntu 51156594 Apr 11 12:58 pfc_nicotine_2.gtf
-rw-rw-r– 1 ubuntu ubuntu 51156594 Apr 11 12:59 pfc_nicotine_3.gtf
-rw-rw-r– 1 ubuntu ubuntu 58630430 Apr 11 12:53 pfc_saline_1.gtf
-rw-rw-r– 1 ubuntu ubuntu 56885955 Apr 11 13:02 pfc_saline_2.gtf
-rw-rw-r– 1 ubuntu ubuntu 56568985 Apr 11 13:03 pfc_saline_3.gtf
assembled_transcripts/pfc_nicotine_1.gtf
assembled_transcripts/pfc_nicotine_2.gtf
assembled_transcripts/pfc_nicotine_3.gtf
assembled_transcripts/pfc_saline_1.gtf
assembled_transcripts/pfc_saline_2.gtf
assembled_transcripts/pfc_saline_3.gtf
# stringtie --merge -p 8 -o stringtie_merged.gtf mergelist.txt
# StringTie version 1.3.5
chr1 StringTie transcript 241681 241935 1000 - . gene_id "MSTRG.1"; transcript_id "MSTRG.1.1";
chr1 StringTie exon 241681 241935 1000 - . gene_id "MSTRG.1"; transcript_id "MSTRG.1.1"; exon_number "1";
chr1 StringTie transcript 242569 242801 1000 - . gene_id "MSTRG.2"; transcript_id "MSTRG.2.1";
chr1 StringTie exon 242569 242801 1000 - . gene_id "MSTRG.2"; transcript_id "MSTRG.2.1"; exon_number "1";
chr1 StringTie transcript 242608 242807 1000 + . gene_id "MSTRG.3"; transcript_id "MSTRG.3.1";
chr1 StringTie exon 242608 242807 1000 + . gene_id "MSTRG.3"; transcript_id "MSTRG.3.1"; exon_number "1";
chr1 StringTie transcript 1545794 1546230 1000 + . gene_id "MSTRG.4"; transcript_id "MSTRG.4.1";
chr1 StringTie exon 1545794 1546230 1000 + . gene_id "MSTRG.4"; transcript_id "MSTRG.4.1"; exon_number "1";
StringTie v1.3.5 usage:
-b enable output of Ballgown table files but these files will be created under the directory path given as <dir_path>
-e only estimate the abundance of given reference transcripts (requires -G)
-G reference annotation to use for guiding the assembly process (GTF/GFF3)
~/hisat_rat$ stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/pfc_01/pfc_saline_1.gtf aligned_bam/pfc_saline_1.bam
~/hisat_rat$ stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/pfc_02/pfc_saline_2.gtf aligned_bam/pfc_saline_2.bam
~/hisat_rat$ stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/pfc_03/pfc_saline_3.gtf aligned_bam/pfc_saline_3.bam
~/hisat_rat$ stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/pfc_04/pfc_nicotine_1.gtf aligned_bam/pfc_nicotine_1.bam
~/hisat_rat$ stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/pfc_05/pfc_nicotine_2.gtf aligned_bam/pfc_nicotine_2.bam
~/hisat_rat$ stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/pfc_06/pfc_nicotine_3.gtf aligned_bam/pfc_nicotine_3.bam
drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 11 15:31 pfc_01
drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 11 15:32 pfc_02
drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 11 15:32 pfc_03
drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 11 15:24 pfc_04
drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 11 15:25 pfc_05
drwxr-xr-x 2 ubuntu ubuntu 4096 Apr 11 15:26 pfc_06
-rw-rw-r– 1 ubuntu ubuntu 5980883 Apr 11 15:31 e2t.ctab
-rw-rw-r– 1 ubuntu ubuntu 22798511 Apr 11 15:31 e_data.ctab
-rw-rw-r– 1 ubuntu ubuntu 5256005 Apr 11 15:31 i2t.ctab
-rw-rw-r– 1 ubuntu ubuntu 10782189 Apr 11 15:31 i_data.ctab
-rw-rw-r– 1 ubuntu ubuntu 73534031 Apr 11 15:31 pfc_saline_1.gtf
-rw-rw-r– 1 ubuntu ubuntu 4714746 Apr 11 15:31 t_data.ctab
# stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/pfc_01/pfc_saline_1.gtf aligned_bam/pfc_saline_1.bam
# StringTie version 1.3.5
chr1 StringTie transcript 241681 241935 1000 - . gene_id "MSTRG.1"; transcript_id "MSTRG.1.1"; cov "1.431373"; FPKM "0.458372"; TPM "1.421554";
chr1 StringTie exon 241681 241935 1000 - . gene_id "MSTRG.1"; transcript_id "MSTRG.1.1"; exon_number "1"; cov "1.431373";
chr1 StringTie transcript 242608 242807 1000 + . gene_id "MSTRG.3"; transcript_id "MSTRG.3.1"; cov "2.966750"; FPKM "0.950050"; TPM "2.946399";
chr1 StringTie exon 242608 242807 1000 + . gene_id "MSTRG.3"; transcript_id "MSTRG.3.1"; exon_number "1"; cov "2.966750";
chr1 StringTie transcript 242569 242801 1000 - . gene_id "MSTRG.2"; transcript_id "MSTRG.2.1"; cov "5.277897"; FPKM "1.690155"; TPM "5.241692";
chr1 StringTie exon 242569 242801 1000 - . gene_id "MSTRG.2"; transcript_id "MSTRG.2.1"; exon_number "1"; cov "5.277897";
chr1 StringTie transcript 1545794 1546230 1000 + . gene_id "MSTRG.4"; transcript_id "MSTRG.4.1"; cov "2.942792"; FPKM "0.942378"; TPM "2.922605";
chr1 StringTie exon 1545794 1546230 1000 + . gene_id "MSTRG.4"; transcript_id "MSTRG.4.1"; exon_number "1"; cov "2.942792";
e_id chr strand start end rcount ucount mrcount cov cov_sd mcov mcov_sd
1 chr1 - 241681 241935 20 2 8.13 3.4275 2.4974 1.1137 1.0974
2 chr1 - 242569 242801 41 19 24.95 8.6395 6.0872 4.8841 4.1833
3 chr1 + 242608 242807 24 8 12.38 5.4850 3.3511 2.6650 1.8097
4 chr1 + 1545794 1546230 36 16 26.00 4.0755 2.4366 2.6865 1.8992
i_id chr strand start end rcount ucount mrcount
1 chr1 - 1671444 1709226 4 4 4.00
2 chr1 - 1709388 1712447 154 154 154.00
3 chr1 - 1712590 1717434 138 138 138.00
4 chr1 - 1717561 1720411 144 144 144.00
t_id chr strand start end t_name num_exons length gene_id gene_name cov FPKM
1 chr1 - 241681 241935 MSTRG.1.1 1 255 MSTRG.1 . 1.431373 0.458372
2 chr1 - 242569 242801 MSTRG.2.1 1 233 MSTRG.2 . 5.277897 1.690155
3 chr1 + 242608 242807 MSTRG.3.1 1 200 MSTRG.3 . 2.966750 0.950050
4 chr1 + 1545794 1546230 MSTRG.4.1 1 437 MSTRG.4 . 2.942792 0.942378
library(ballgown); library(genefilter); library(dplyr); library(devtools); library(gplots)
Attaching package: 㤼㸱ballgown㤼㸲
The following object is masked from 㤼㸱package:base㤼㸲:
structure
Attaching package: 㤼㸱dplyr㤼㸲
The following objects are masked from 㤼㸱package:ballgown㤼㸲:
contains, expr, last
The following objects are masked from 㤼㸱package:stats㤼㸲:
filter, lag
The following objects are masked from 㤼㸱package:base㤼㸲:
intersect, setdiff, setequal, union
Attaching package: 㤼㸱gplots㤼㸲
The following object is masked from 㤼㸱package:stats㤼㸲:
lowess
data_directory=("ballgown/")
data_directory
[1] "ballgown/"
bg=ballgown(dataDir=data_directory, samplePattern="pfc", meas="all")
Tue Apr 23 22:19:41 2019
Tue Apr 23 22:19:41 2019: Reading linking tables
Tue Apr 23 22:19:42 2019: Reading intron data files
Tue Apr 23 22:19:45 2019: Merging intron data
Tue Apr 23 22:19:48 2019: Reading exon data files
Tue Apr 23 22:19:55 2019: Merging exon data
Tue Apr 23 22:19:56 2019: Reading transcript data files
Tue Apr 23 22:19:58 2019: Merging transcript data
Wrapping up the results
Tue Apr 23 22:19:58 2019
bg
ballgown instance with 55640 transcripts and 6 samples
names(structure(bg))
[1] "intron" "exon" "trans"
structure(bg)$exon
GRanges object with 301679 ranges and 2 metadata columns:
seqnames ranges strand | id transcripts
<Rle> <IRanges> <Rle> | <integer> <character>
[1] chr1 241681-241935 - | 1 1
[2] chr1 242569-242801 - | 2 2
[3] chr1 242608-242807 + | 3 3
[4] chr1 1545794-1546230 + | 4 4
[5] chr1 1545794-1546231 - | 5 5
... ... ... ... . ... ...
[301675] chrY_KL568157v1_random 3208681-3209783 - | 301675 55636
[301676] chrY_KL568157v1_random 3219092-3219982 + | 301676 55637
[301677] chrY_KL568157v1_random 3219092-3219985 - | 301677 55638
[301678] chrY_KL568161v1_random 7188592-7190249 + | 301678 55639
[301679] chrY_KL568161v1_random 7188598-7190160 - | 301679 55640
-------
seqinfo: 121 sequences from an unspecified genome; no seqlengths
structure(bg)$intron
GRanges object with 247640 ranges and 2 metadata columns:
seqnames ranges strand | id transcripts
<Rle> <IRanges> <Rle> | <integer> <character>
[1] chr1 1671444-1709226 - | 1 15
[2] chr1 1709388-1712447 - | 2 c(15, 17, 18)
[3] chr1 1712590-1717434 - | 3 c(15, 17, 18)
[4] chr1 1717561-1720411 - | 4 c(15, 17, 18)
[5] chr1 1720622-1722140 - | 5 15
... ... ... ... . ... ...
[247636] chrY 1228283-1229180 + | 247636 55627:55629
[247637] chrY 1229305-1231811 + | 247637 55627:55629
[247638] chrY 1231860-1235052 + | 247638 55627:55629
[247639] chrY 1235111-1238311 + | 247639 55627:55629
[247640] chrY 1220424-1220824 + | 247640 55628
-------
seqinfo: 70 sequences from an unspecified genome; no seqlengths
structure(bg)$trans
GRangesList object of length 55640:
$1
GRanges object with 1 range and 2 metadata columns:
seqnames ranges strand | id transcripts
<Rle> <IRanges> <Rle> | <integer> <character>
[1] chr1 241681-241935 - | 1 1
$2
GRanges object with 1 range and 2 metadata columns:
seqnames ranges strand | id transcripts
[1] chr1 242569-242801 - | 2 2
$3
GRanges object with 1 range and 2 metadata columns:
seqnames ranges strand | id transcripts
[1] chr1 242608-242807 + | 3 3
...
<55637 more elements>
-------
seqinfo: 121 sequences from an unspecified genome; no seqlengths
structure(bg)
$intron
GRanges object with 247640 ranges and 2 metadata columns:
seqnames ranges strand | id transcripts
<Rle> <IRanges> <Rle> | <integer> <character>
[1] chr1 1671444-1709226 - | 1 15
[2] chr1 1709388-1712447 - | 2 c(15, 17, 18)
[3] chr1 1712590-1717434 - | 3 c(15, 17, 18)
[4] chr1 1717561-1720411 - | 4 c(15, 17, 18)
[5] chr1 1720622-1722140 - | 5 15
... ... ... ... . ... ...
[247636] chrY 1228283-1229180 + | 247636 55627:55629
[247637] chrY 1229305-1231811 + | 247637 55627:55629
[247638] chrY 1231860-1235052 + | 247638 55627:55629
[247639] chrY 1235111-1238311 + | 247639 55627:55629
[247640] chrY 1220424-1220824 + | 247640 55628
-------
seqinfo: 70 sequences from an unspecified genome; no seqlengths
$exon
GRanges object with 301679 ranges and 2 metadata columns:
seqnames ranges strand | id transcripts
<Rle> <IRanges> <Rle> | <integer> <character>
[1] chr1 241681-241935 - | 1 1
[2] chr1 242569-242801 - | 2 2
[3] chr1 242608-242807 + | 3 3
[4] chr1 1545794-1546230 + | 4 4
[5] chr1 1545794-1546231 - | 5 5
... ... ... ... . ... ...
[301675] chrY_KL568157v1_random 3208681-3209783 - | 301675 55636
[301676] chrY_KL568157v1_random 3219092-3219982 + | 301676 55637
[301677] chrY_KL568157v1_random 3219092-3219985 - | 301677 55638
[301678] chrY_KL568161v1_random 7188592-7190249 + | 301678 55639
[301679] chrY_KL568161v1_random 7188598-7190160 - | 301679 55640
-------
seqinfo: 121 sequences from an unspecified genome; no seqlengths
$trans
GRangesList object of length 55640:
$1
GRanges object with 1 range and 2 metadata columns:
seqnames ranges strand | id transcripts
<Rle> <IRanges> <Rle> | <integer> <character>
[1] chr1 241681-241935 - | 1 1
$2
GRanges object with 1 range and 2 metadata columns:
seqnames ranges strand | id transcripts
[1] chr1 242569-242801 - | 2 2
$3
GRanges object with 1 range and 2 metadata columns:
seqnames ranges strand | id transcripts
[1] chr1 242608-242807 + | 3 3
...
<55637 more elements>
-------
seqinfo: 121 sequences from an unspecified genome; no seqlengths
pData(bg) = data.frame(id=sampleNames(bg), group=rep(c(0,1), each=3))
pData(bg)
exon_transcript_table = indexes(bg)$e2t
head(exon_transcript_table)
transcript_gene_table = indexes(bg)$t2g
head(transcript_gene_table)
phenotype_table = pData(bg)
phenotype_table
transcript_fpkm = texpr(bg, "FPKM")
head(transcript_fpkm)
FPKM.pfc_01 FPKM.pfc_02 FPKM.pfc_03 FPKM.pfc_04 FPKM.pfc_05 FPKM.pfc_06
1 0.458372 0.910474 1.130689 0.624670 1.220050 1.220050
2 1.690155 1.697905 1.266853 1.423263 1.584901 1.584901
3 0.950050 1.330505 1.779630 2.121050 2.266203 2.266203
4 0.942378 1.360096 0.644549 1.238039 2.387492 2.387492
5 0.946076 1.113187 1.024247 1.794179 1.693284 1.693284
6 0.482096 0.767261 0.722560 0.634936 1.210922 1.210922
transcript_cov = texpr(bg, "cov")
head(transcript_cov)
cov.pfc_01 cov.pfc_02 cov.pfc_03 cov.pfc_04 cov.pfc_05 cov.pfc_06
1 1.431373 2.651634 3.311765 1.325490 2.628758 2.628758
2 5.277897 4.944921 3.710587 3.020029 3.414878 3.414878
3 2.966750 3.874917 5.212501 4.500667 4.882833 4.882833
4 2.942792 3.961098 1.887872 2.627002 5.144165 5.144165
5 2.954338 3.242009 3.000000 3.807078 3.648402 3.648402
6 1.505455 2.234545 2.116364 1.347273 2.609091 2.609091
whole_tx_table = texpr(bg, "all")
head(whole_tx_table)
exon_mcov = eexpr(bg, "mcov")
head(exon_mcov)
mcov.pfc_01 mcov.pfc_02 mcov.pfc_03 mcov.pfc_04 mcov.pfc_05 mcov.pfc_06
1 1.1137 2.2314 2.9922 0.9843 2.2627 2.2627
2 4.8841 4.6094 3.3047 2.7554 3.0644 3.0644
3 2.6650 3.5100 4.7700 3.9450 4.6250 4.6250
4 2.6865 3.7963 1.6293 2.3318 4.9428 4.9428
5 2.7808 3.1187 2.6804 3.5662 3.5799 3.5799
6 1.3818 2.1909 2.0382 1.3473 2.5236 2.5236
junction_recount = iexpr(bg)
head(junction_recount)
rcount.pfc_01 rcount.pfc_02 rcount.pfc_03 rcount.pfc_04 rcount.pfc_05 rcount.pfc_06
1 4 3 0 3 0 0
2 154 124 108 106 63 63
3 138 115 120 107 76 76
4 144 129 127 94 94 94
5 1 0 1 0 1 1
6 4 1 0 0 2 2
whole_intron_table = iexpr(bg, "all")
head(whole_intron_table)
gene_expression = gexpr(bg)
head(gene_expression)
FPKM.pfc_01 FPKM.pfc_02 FPKM.pfc_03 FPKM.pfc_04 FPKM.pfc_05 FPKM.pfc_06
MSTRG.1 0.458372 0.910474 1.130689 0.624670 1.220050 1.220050
MSTRG.10 1.829527 1.922782 1.699969 1.873358 1.850956 1.850956
MSTRG.100 1.907345 2.092099 1.937360 2.462650 1.798789 1.798789
MSTRG.1000 4.583478 4.273662 4.324599 4.178418 4.420674 4.420674
MSTRG.10000 3.866415 3.776652 4.248838 3.407007 2.984207 2.984207
MSTRG.10001 2.672113 2.877509 2.262855 2.764531 2.257430 2.257430
tropical= c('darkorange', 'dodgerblue', 'hotpink', 'limegreen', 'yellow')
palette(tropical)
fpkm = texpr(bg, meas="FPKM")
fpkm = log2(fpkm+1)
boxplot(fpkm,
col=as.numeric(pData(bg)$group),
las=2,
ylab='log2(FPKM+1)')
cols = colorpanel(99, "blue", "black", "yellow")
fpkm = texpr(bg, meas="FPKM")
fpkm = log2(fpkm+1)
heatmap.2(fpkm, density.info = "none",
trace = "none",
margins = c(8, 5),
cexCol = 1.2,
keysize = 1,
col = cols,
scale = "none")
Error: cannot allocate vector of size 11.5 Gb
library(ggfortify)
Loading required package: ggplot2
Attaching package: 㤼㸱ggplot2㤼㸲
The following object is masked from 㤼㸱package:ballgown㤼㸲:
expr
fpkm = texpr(bg, meas="FPKM")
fpkm = log2(fpkm+1)
pca = (prcomp(t(fpkm)))
autoplot(pca, data=pData(bg), colour = "group", label = T, label.label = "id" )
names(indexes(bg))
[1] "e2t" "i2t" "t2g" "bamfiles" "pData"
head(indexes(bg)$e2t)
head(indexes(bg)$i2t)
head(indexes(bg)$t2g)
exon_transcript_table = indexes(bg)$e2t
transcript_gene_table = indexes(bg)$t2g
head(transcript_gene_table)
results_transcripts = stattest(bg, feature = "transcript", meas = "FPKM", covariate = "group", getFC = TRUE)
write.table(results_transcripts, file = "ballgown_transcript_results.txt", sep = "\t", quote = F, row.names = F)
results_transcripts <- arrange(results_transcripts, pval)
head(results_transcripts)
results_genes = stattest(bg, feature = "gene", meas = "FPKM", covariate = "group", getFC = TRUE)
write.table(results_genes, file = "ballgown_gene_results.txt", sep = "\t", quote = F, row.names = F)
results_genes <- arrange(results_genes, pval)
head(results_genes)
plotTranscripts(gene = "MSTRG.6551", gown = bg, samples = sampleNames(bg), meas = "FPKM", colorby = "transcript",
main = "transcripts from gene MSTRG.6551")
bg_filt = subset(bg,"rowVars(texpr(bg)) > 1",genomesubset=TRUE)
bg_filt
ballgown instance with 18410 transcripts and 6 samples
filt_transcript_results = stattest(bg_filt, feature='transcript', meas='FPKM', covariate='group')
filt_results_transcripts <- arrange(filt_transcript_results, pval)
head(filt_results_transcripts)
filt_gene_results = stattest(bg_filt, feature='gene', meas='FPKM', covariate='group')
filt_results_genes <- arrange(filt_gene_results, pval)
head(filt_gene_results)
filt_results_transcripts = data.frame(geneNames=ballgown::geneNames(bg_filt),
geneIDs=ballgown::geneIDs(bg_filt), filt_transcript_results)
filt_results_transcripts = arrange(filt_results_transcripts,pval)
head(filt_results_transcripts)
subset(filt_results_transcripts,filt_results_transcripts$qval<0.05)
subset(filt_results_genes,filt_results_genes$qval<0.05)
plotTranscripts(gene='MSTRG.15358',
gown=bg,
samples='pfc_01',
meas='FPKM',
colorby='transcript',
main='transcripts from gene MSTRG.15358: sample pfc_01, FPKM')
plotTranscripts(gene='MSTRG.15358',
gown=bg,
samples=c("pfc_01", "pfc_02", "pfc_03"),
meas='FPKM',
colorby='transcript',
main='transcripts from gene MSTRG.15358: samples pfc_01-pfc_03, FPKM')
plotTranscripts(gene='MSTRG.15358',
gown=bg,
samples=c("pfc_04", "pfc_05", "pfc_06"),
meas='FPKM',
colorby='transcript',
main='transcripts from gene MSTRG.15358: samples pfc_04-pfc_06, FPKM')
plotMeans('MSTRG.15358', bg, groupvar='group', meas='FPKM', colorby='transcript')
plotTranscripts(gene='MSTRG.17264',
gown=bg,
samples="pfc_01",
meas='FPKM',
colorby='transcript',
main='transcripts from gene MSTRG.17264: samples pfc_01-pfc_03, FPKM')
plotTranscripts(gene='MSTRG.17264',
gown=bg,
samples=c("pfc_01", "pfc_02", "pfc_03"),
meas='FPKM',
colorby='transcript',
main='transcripts from gene MSTRG.17264: samples pfc_01-pfc_03, FPKM')
plotTranscripts(gene='MSTRG.17264',
gown=bg,
samples=c("pfc_04", "pfc_05", "pfc_06"),
meas='FPKM',
colorby='transcript',
main='transcripts from gene MSTRG.17264: samples pfc_04-pfc_06, FPKM')
plotMeans('MSTRG.17264', bg, groupvar='group', meas='FPKM', colorby='transcript')
idx4 <- which(geneIDs(bg)=="MSTRG.15358")
idx4
22656 22657
22656 22657
ballgown::transcriptNames(bg)[22656]
22656
"MSTRG.15358.1"
plot(fpkm[22656,] ~ pData(bg)$group,
main=paste(ballgown::geneNames(bg)[22656],' : ', ballgown::transcriptNames(bg)[22656]),
pch=19,
xlab="Treatment",
ylab='log2(FPKM+1)')
points(fpkm[22656,] ~ jitter(as.numeric(pData(bg)$group)), col=as.numeric(pData(bg)$group))
plot(fpkm[22657,] ~ pData(bg)$group,
main=paste(ballgown::geneNames(bg)[22657],' : ', ballgown::transcriptNames(bg)[22657]),
pch=19,
xlab="Treatment",
ylab='log2(FPKM+1)')
points(fpkm[22657,] ~ jitter(as.numeric(pData(bg)$group)), col=as.numeric(pData(bg)$group))
idx3 <- which(geneIDs(bg)=="MSTRG.17264")
idx3
25382 25384
25382 25384
ballgown::transcriptNames(bg)[25382]
25382
"MSTRG.17264.1"
plot(fpkm[25382,] ~ pData(bg)$group,
main=paste(ballgown::geneNames(bg)[25382],' : ', ballgown::transcriptNames(bg)[25382]),
pch=19,
xlab="Treatment",
ylab='log2(FPKM+1)')
points(fpkm[25382,] ~ jitter(as.numeric(pData(bg)$group)), col=as.numeric(pData(bg)$group))
ballgown::transcriptNames(bg)[25384]
25384
"MSTRG.17264.2"
plot(fpkm[25384,] ~ pData(bg)$group,
main=paste(ballgown::geneNames(bg)[25384],' : ', ballgown::transcriptNames(bg)[25384]),
pch=19,
xlab="Treatment",
ylab='log2(FPKM+1)')
points(fpkm[25384,] ~ jitter(as.numeric(pData(bg)$group)), col=as.numeric(pData(bg)$group))
plot(fpkm[25384,] ~ pData(bg)$group,
main=paste(ballgown::geneNames(bg)[25384],' : ', ballgown::transcriptNames(bg)[25384]),
pch=19,
xlab="Treatment",
ylab='log2(FPKM+1)')
points(fpkm[25384,] ~ jitter(as.numeric(pData(bg)$group)), col=as.numeric(pData(bg)$group))
plotMeans('MSTRG.8425', bg, groupvar='group', meas='FPKM', colorby='transcript')
plotMeans('MSTRG.8425', bg_filt, groupvar='group', meas='FPKM', colorby='transcript')
no non-missing arguments to min; returning Infno non-missing arguments to max; returning -InfError in seq.default(min(gtrans$start), max(gtrans$end), by = 1) :
'from' must be a finite number
plotMeans('MSTRG.8851', bg, groupvar='group', meas='FPKM', colorby='transcript')
plotMeans('MSTRG.8851', bg_filt, groupvar='group', meas='FPKM', colorby='transcript')