-
Notifications
You must be signed in to change notification settings - Fork 1
03b EQTL analysis
Once all the files have been placed in the correct format you can easily run eQTL analysis with the matrix eqtl script. This is a lightweight wrapper that implements the original MEQTL analysis strategy for cis/trans QTLs. The script is currently only capable on one set of files at a time, meaning that if experimental data is split by chromosome it must be run 22 times for each autosome. Please see MatrixEQTL page for complete options Minimum example for CLI
#Running on one chromosome
Rscript MatrixEQTL.R -sg PATH/TO/snp_genotype -sl PATH/RO/snp_location -ge PATH/TO/gene_expression_chr1 -gl PATH/TO/gene_location_chr1
#for all 22 chromosomes
for i in $(seq 1 22)
do
Rscript MatrixEQTL.R -sg PATH/TO/snp_genotype -sl PATH/TO/snp_location -ge PATH/TO/gene_expression_chr"{$i}" -gl PATH/TO/gene_location_chr"{$i}"
done
The sample list follows a fairly simple format.
- There should be no headers
- The first column should be a list of samples
- One sample name per line
- Sample names should not contain any file types (for example .fastq and/or .gz endings can be removed from the name e.g. sample1.fastq becomes sample1)
- Sample names should not contain any path information (for example /home/data/sample1.fastq can be listed as sample1)
- Sample names should not contain any of its end information (For example with paired end files you may have sample1_R1.fastq and sample1_R2.fastq. These may be reduced to simply sample1.)
- The sample list should not contain any duplicates (For example with paired end files you may have sample1_R1.fastq and sample1_R2.fastq. These may be reduced to simply sample1)
Often times the sample names that fastq files are tagged with differ from how they need to be presented downstream. For example, genotype files may contain unique identifiers that differ from the fastq file names. With this in mind it is possible to introduce different names for your samples early on in the pipeline. To do this users can optionally introduce a second column of sample names to the sample list. The first column will still identify the correct input sample and outputs will simply be renamed to match the corresponding name in the second column. This name translation step will only take place during alignment steps. As such if users need to translate names they should do this right from the beginning Users only need to make this list once and it will not interfere with analysis downstream.
an easy and quick way to generate the sample list is using the unix command ls | cut -f 1 -d <delimeter> > sample_list.txt
. This will cut file names into chunks that can be easily selected by the user. Please see the cut manual page for more details