I did manage to bild index file (from NCBI transcriptome) and perform alingment in Rsubread in R with my fq files. I did get BAM files as a result and no error. However i am having trouble with next step as featurecount function does not produce any result( 0%). I have tried builtin annotation (hg38)
i am wondering if BAM files are ok..
this is the code i have used
library(Rsubread)
index_path <- "D:/FASTQ_Raw/hum_transcr"
all_files <- list.files(path = "D:/FASTQ_Raw", pattern = ".fq$", full.names = TRUE)
common_prefixes <- unique(gsub("_[12]\\.fq$", "", basename(all_files)))
output_directory <- "aligned_reads/"
dir.create(output_directory, showWarnings = FALSE)
for (prefix in common_prefixes) {
read1_file <- paste0("D:/", prefix, "_1.fq")
read2_file <- paste0("D:/", prefix, "_2.fq")
output_file <- paste0(output_directory, prefix, "_aligned.bam")
align(index = index_path,
readfile1 = read1_file,
readfile2 = read2_file,
output_file = output_file,
nthreads = 4) # Adjust the number of threads as needed
}